Project Description
The goal of this project was to create Hybrid Images. These are images that appear one way
at close-range and a different way at a distance. The inspiration for this project was this paper by
Oliva, Torralba, and Schyns.
In order to create the hybrid of two images, the images were separated into their high and
low frequency components. Then they were combined in a certain order to create the delightful hybrids
you see lower on this page.
Examples of my Hybrid Images
Filtering the Images
Low Pass Filter: Gaussian Pyramid
In order to obtain the low frequency parts of each image, I made a Gaussian pyramid for each. This involved
convolving the image with a Gaussian filter matrix and then resizing the image to half its size.
This process was repeated N times to create a pyramid of height N.
|
|
|
|
|
|
|
|
High Pass Filter: Laplacian Pyramid
To get the high frequencies, I made a Laplacian Pyramid. I did not convolve the images
with a Laplacian filter, but I took the Laplacian of the Gaussian images from the
Gaussian Pyramid. That is a really complicated way to say that I got the high frequency
components by taking the original image and subtracting the low-frequency image from the
level directly above. Between each pair levels of the Gaussian Pyramid, I was able to
calculate a high-frequency filtered image. When I repeated this for all levels, I had the
Laplacian Pyramid (shown below).
|
|
|
|
|
|
|
In order to make a hybrid image, I created a pair of pyramids for each input image.
Making the Hybrid Image
If I wanted to re-create an image from only the elements of the two pyramids, I could do that
by adding the Gaussian image at level X and the Laplacian Image at level X, and then
repeating that process for all pairs levels of the pyramids.
To get a hybrid image, I wanted to transition from one image to the next at a certain frequency.
I selected the transition frequency by selecting a certain level of the Laplacian pyramid.
At that transition level, I stopped adding in elements from the first image and started adding from
the second. Here is an example case where the transition was at level 3 of the pyramid:
Start Image 1
|
Start Image 2
|
|
|
+
|
+
|
+
|
+
|
+
|
+
|
+
|
=
|
Results from Sample Images
The Effect of Color
I tried making the hybrid images using all of the color channels for high and low frequencies, only for high frequencies, or only for low frequencies. I think that generally color did not enhance the effect of the hybrid images, and in fact slightly diminished it. The hybridized color images did look artistically interesting, for example the image below:
There was something I didn't expect about using color in the hybrid images - it was possible to manipulate texture. I found the following sample images of a couture dress and an octopus. The dress has a very intricate texture and the octopus has a very intricate color pattern.
When I hybridized these two images in color for both high and low frequencies, there is some mixing of the colors of the octopus and the colors of the dress, and at a distance only the octopus is visible. This is what I expected.
But when I used a greyscale image of the octopus for the low frequencies and the color image of the dress for the high frequencies, it seems like the texture of the octopus and the texture of the dress were mixed. The dress looks like it might be made of a type of fur instead of the pointy material it is actually made of.
I also did the reverse and used a color image of the octopus for low frequencies and a greyscale version of the dress for the high frequencies. In this case it looks like I completely replaced the colors of the dress with the colors of the octopus, but the texture of the dress was preserved.
Replacing Frequencies
I tried to see if I could switch out the images that were only composed of certain frequencies.
In the images below I took the grey scale hybrid image of the tornado and Eiffel Tower and I combined it with the image of the abbey. In the first image I used the abbey for the low frequencies (you can see that the tornado was completely replaced), and in the second image I used the abbey for the high frequencies (you can see that the Eiffel Tower was completely replaced). This demonstrates how visual phenomena that are composed of a restricted range of frequencies can be completely eliminated from an image.