The goal of this lab is to create hybrid images, which is a clever blend of two images. It is done by blending the high frequency portion of one image and the low frequency portion of another.
For every pair of images, I first converted them into grayscale and aligned them. Then I created the low pass image by generating a gaussian filter and apply that to one image, and for the high pass image I also created a gaussian filter and take the result of the original image minus the filtered image. Adding together these filtered images gives the resulting hybrid image.
Experimenting with the result of different "front/back" images, the sigma and matrix size for the gaussian filters I find that the low pass gaussian filter looks better using a smaller matrix such as size 5 or 9 together with small sigma value, while the gaussian filter used for generating the high pass image works better with larger matrix size and sigma values.
Applying color to the images turns out to be a good way of emphasizing the closer (high pass) image. When we look closely the color really helps to bring out the content of the image and it also fade away when we look at a certain distance, while the far (low pass) image does not actually need the color definition that much, since it is already blurred and looking at some distance we will only be able to see a silhouette of the image. Hence I tried to apply color only to the low pass image.
Here are the results of the four pairs of images that I experimented on.
Cute baby face appear while looking closely, turning into dog face at far distance.
|
grayscale hybrid |
colored low pass image hybrid |
fft for original dog image |
fft for original baby image |
fft for filtered dog image |
fft for filtered baby image |
fft for hybrid image |
Gaussian pyramid at level 1. |
Gaussian pyramid at level 2. |
Gaussian pyramid at level 3. |
Gaussian pyramid at level 2. |
Gaussian pyramid at level 5. |
Laplacian pyramid at level 1. |
Laplacian pyramid at level 2. |
Laplacian pyramid at level 3. |
Laplacian pyramid at level 4. |
Laplacian pyramid at level 5. |
|
grayscale hybrid |
colored low pass image hybrid |
|
|
grayscale hybrid |
colored low pass image hybrid |
|
grayscale hybrid |
colored low pass image hybrid |