CSCI 1430 Project 1

Hybrid Images
Reese Kuppig (rkuppig)

The objective of this project was to implement an algorithm that combines two images into one hybrid image using Gaussian and Laplacian image pyramids. The overall effect is created by separating the high and low frequencies of the images such that one image is more visible from close-up, while the other image becomes more visible as you move farther away. 



Image Pyramids:

Guassian and Laplacian pyramids represent a repeated low pass filtering and high pass filtering, respectively, of an image. Each pyramid level is formed as follows:

 


Results:












1) The original image is blurred with a Gaussian filter, and the blurred image is subtracted from the original, essentially extracting the highest frequencies in the image.
2) The blurred image is then downsampled, to negate the effects of the Gaussian filter, and step 1 is repeated for this new image.

Below is a sample Gaussian image pyramid, followed by a Laplacian image pyramid. The Laplacian pyramid has been brightened for clarity. 




Algorithm:

The process of creating a hybrid image breaks down into the following steps:

1) The two images are aligned such that similar features overlap and mask eachother. This aids in the visual effect, so that noticeable features of the less visible image do not distract the viewer's perception of the dominant image at a certain viewing distance.
2) Each image is then decomposed into a Gaussian pyramid and a Laplacian pyramid as described above.
3) Given a cutoff index N, the hybrid image is composed by combining the first 1 through N levels of the first image's Laplacian pyramid with the N+1 through last levels of the second image's Laplacian pyramid and the last level of the second image's Gaussian pyramid.
4) Finally, the hybrid image is cropped and exported.


Results:

The two original images followed by large and small versions of the hybrid image. Notice that the first image (high frequencies) is more prominent in the large hybrid image, while the second (low frequencies) becomes visible in the small hybrid image.

Some image pairs are better suited to the effect than others. For instance, the Einstein-Marilyn hybrid works well, probably due to the similarity of tone and shape of their faces, whereas the rhino-car hybrid does not work quite as well, possibly due to the prominent areas of solid color in both images, which are different shapes and do not overlap well in the composition.