hybrid images

miya schneider (mmschnei)

overview

This project was completed for CSCI1430: Computational Vision, taught by James Hays at Brown University. For this project, I used the 2006 paper titled "Hybrid Images" by Oliva, Toralba, and Schyns. To create these hybrid images, I first aligned the two images. Next, I generated the Gaussian and Laplacian pyramids (see below) for each image. The final picture was generated using these pyramids to sum the low-pass filter of the first image and a high-pass filter of the second image. To accomplish this, I chose to sum the first X levels of the Laplacian pyramid for the first image and the last Y levels of the Laplacian pyramid for the second image. I also added the last level of the Gaussian pyramid for the first image to account for the rest of the low frequencies.

image pyramids

Gaussian (low-pass filter) of the first image

To generate the Gaussian pyramid, I first blurred the image (took a Gaussian filter) and then scaled down the image by a factor of two. I repeated this N times, where N was the number of pyramid levels. To generate the Laplacian pyramid, I took the difference of the Gaussian-blurred image and the original image. Note that for visualization purposes I added .5 to the images below.

Laplacian (high-pass filter) of the second image

results

These are the results I obtained from my Matlab code. Note that I varied certain parameters (sigma and the two cutoff frequencies) in order to obtain the best image (or at least, the best image I was able to get). However, I kept the pyramid depth and filter size constant (at 8 and 3x3, respectively). I experimented with implementing a linear function that chose the filter size, but it didn't seem to make much of a difference. If I were to do this again, I would probably try changing up the depth and filter size more.

Cat and Dog


Nutmeg and Derek


Einstein and Marilyn Monroe


Car and Rhino


Guitar and Eiffel Tower

implementing color

To implement color, I only changed the code to account for three color channels and commented out the original code that grayscaled the images.


Lion and Dad

This is my daddy. :) He refuses to cut his hair. The longer it gets, the less we go out in public with him. Throughout the years, he's found kinship in furrier creatures (lions, sheep dogs, poodles). This hybrid was my best attempt to capture this similarity.


Van Gogh and Shakespeare

To generate the two hybrids above, I simply reversed which image contributed the high-frequency component and which image contributed to the low-frequency component. The image on the bottom left represents Van Gogh as low-pass, whereas the image on the bottom right represents Shakespeare as high-pass. From this, we can see that the low-frequency component is responsible for color.

analysis & conclusion

Hybrid images are neat and fun (I spent about two hours trying to hybrid my mom and dad to see if I got someone who looked like me), but it seems that they require a very specific set of conditions (or at least, with my abilities they require a very specific set of conditions). The images have to be very similar in terms of the shapes and edges. It seems that very few images are actually able to form a successful hybrid, and that a heavy search is required to find compatible images.