CS 143 / Project 1 / Image Filtering and Hybrid Images

Figure 1: Example of a hybrid image. Up close the image is of a cat. From far away, it looks more like a dog.

This project involves creating a hybrid image by combining two images that have undergone a high frequency filter and a low frequency filter. The resulting image is a combination of the two images, in which the viewer will see one image up close, but a different image from afar.

The reasoning behind this is that from afar, low frequencies matters more to our eyes, while up close, our eyes can pick up the higher frequencies within the image.

Figure 2: Low frequency image (left), High frequency image (center), Hybrid (right).

Figure 2 was created by:

  1. Applying a Gaussian filter, which is a low pass filter, on an image of a dog. The Gaussian filter remove high frequencies from the image, resulting in the image looking blurry. This image will come into view when look from afar.
  2. Applying a Gaussian filter on an image of a cat, and subtracting that from the original image. This remove the low frequencies from the image, resulting in an image that looks sharp. This image is what is being seen up close.
  3. The hybrid image is the combination of the two images.

Gaussian Filter

Gaussian Distribution in two dimension

The Gaussian filter can be adjusted by changing the standard deviation in which the filter is sensitive to. The standard deviation is the standard deviation of the Gaussian distribution, the equation that the Gaussian filter is based upon.

By adjusting the standard deviation, we can get different hybrid images:

Figure 3: Standard Deviation is 3.

Figure 4: Standard Deviation is 10.

We can see that by changing the standard deviation, we can have a huge affect on the image. Figure 3, for example, has the standard deviation set too low and thus the hybrid image looks mostly like a dog, irregardless of the distance. Figure 4, on the other hand, has the standard deviation set too high, and thus looks mostly like a cat throughout.

Changing the standard deviation around for different images will give better or worse results, depending on the images you are trying to hybrid.

Hybrid Images

The images below are different hybrid images with the standard deviation set at 3, 5, 7, and 10.

Figure 5: Marilyn and Einstein Hybrid.

Figure 6: Bicycle and Motorcycle Hybrid.

Figure 7: Fish and Submarine Hybrid.

Figure 8: Bird and Plane Hybrid.

As you can see, some hybrid images are better under different standard deviation of the Gaussian distribution.

Images in Reverse Order

Swapping the image in which you pass into the low and high pass filter will affect which image you see up close and what you will see far away. Image that is passed through the low pass filter can be seen from afar and image that is passed through the high pass filter will be seen up close.