CS1430 Project 1: Hybrid Images

Overview
The goal of the assignment was to create hybrid images, a technique that by combining the lower frequencies of one image with the higher frequencies of another, one gets an image that is interpreted differently based on the viewing distance. From a distance, higher frequencies are not seen well, and so the lower frequency image becomes dominant. At close distances, the reverse is true.
Algorithm
The algorithm was pretty straightforward. After aligning and cropping each image, I created a non-scaling laplacian pyramid of each (I chose non-scaling because I would just be summing the pyramid shortly, and not have to concern myself with varying image sizes). For the gaussian blurred portion of the pyramid, I had a filter whose width was 3 times its sigma, and the sigma could be changed as an input. For the high frequencies, I simply took the difference between consecutive blurred steps, and saved the images in a separate cell array.
To create the hybrid image, I would take the bottom gaussian of the first input image, then sum the associated high-frequency laplacian levels up to the input cutoff. For the other input image, I took a base gaussian of the first input image as a base, and then summed its associated high-frequences. I then added these two components together.
EXTRA CREDIT: For color, I played around with having both contribute color, or one color and one grayscale. Generally, if one were to use color, having the lower frequency image be the sole contributor works best, simply because it keeps the color uniform, and the higher frequencies simply change the values. Though I liked the rainbow effect of the top image, so I kept it.
Results
Here are results of various types and colors.
![]() Higher Frequency Image |
![]() Lower Frequency Image |
![]() Before/After (Both contribute color) |
![]() Higher Frequency Image |
![]() Lower Frequency Image |
![]() Spoilers. (Both grayscale) |
![]() Higher Frequency Image |
![]() Lower Frequency Image |
![]() Alone in the world was a little CatDog... (Lower frequency color, Higher ) |
![]() Higher Frequency Image |
![]() Lower Frequency Image |
![]() I tried to come up with a Marilyn Monroe cat pun, but I failed. (Both grayscale) |
![]() Higher Frequency Image |
![]() Lower Frequency Image |
![]() Tried to bring back a classic, did not work too well though. (Both contribute color) |
![]() Higher Frequency Image |
![]() Lower Frequency Image |
![]() Cliche image, beauty and the brain. (Both grayscale) |