CS 143 / Project 1 / Image Filtering and Hybrid Images

Algorithm

In my_imfilter, I padded the input images with zeros and applied the linear filter described in the equation 3.12. To generate the hybrid image, I used the given Gaussian filter with various cutoff frequency values. I used a single cutoff frequency for both low and high frequency images. To get the low frequency image, I applied the blurring with that filter. To get the high frequency image, I subtracted the blurred version of the image from the original image. I generated the hybrid image by taking the sum of low and high frequency images. Nothing particular.

Example 1

Dog (low frequency) and Cat (high frequency) with frequency = 7

The two original images look like this:

The low-pass (blurred) and high-pass versions of these images look like this:

The hybrid image is progressively downsampled:

The hybrid image:



Example 1.a

Dog (low frequency) and Cat (high frequency) with frequency = 3

I am using the same dog and cat images from Example 1. I lowered the frequency so that the low frequency image (dog) is less blurry, and the high frequency image (cat) is less sharp. The result image looks more like the dog (low frequency image) than in Example 1.

The low-pass (blurred) and high-pass versions of these images look like this:

The hybrid image is progressively downsampled:

The hybrid image:



Example 1.b

Dog (low frequency) and Cat (high frequency) with frequency = 10

I am using the same dog and cat images from Example 1. I increased the frequency so that the low frequency image (dog) is more blurry, and the high frequency image (cat) is more sharp. The result image looks more like the cat (high frequency image) than in Example 1.

The low-pass (blurred) and high-pass versions of these images look like this:

The hybrid image is progressively downsampled:

The hybrid image:



Example 2

Einstein (low frequency) and Marilyn (high frequency) with frequency = 3

The two original images look like this:

The low-pass (blurred) and high-pass versions of these images look like this:

The hybrid image is progressively downsampled:

The hybrid image:



Example 3

Marilyn (low frequency) and Einstein (high frequency) with frequency = 3

The two original images look like this:

The low-pass (blurred) and high-pass versions of these images look like this:

The hybrid image is progressively downsampled:

The hybrid image:



Example 4

Eugene Charniak (low frequency) and Stan Zdonik (high frequency) with frequency = 3

The two original images look like this:

The low-pass (blurred) and high-pass versions of these images look like this:

The hybrid image is progressively downsampled:

The hybrid image: