This project centers around the idea of creating hybrid images. A hybrid image, in this case, is a combination of two images such that up close, the viewer sees one image, and from far away, the viewer sees the other image.
The hybrid image is created by first aligning, resizing, and cropping the two images such that they lineup and are the same size. We then take the high frequencies from the first image and the low frequencies from the second image, and add them together to produce the hybrid image.
We accomplish this by utilizing laplacian pyramids. We first construct a gaussian and laplacian pyramid for each of the images. The gaussian pyramid is constructed by taking the image from the previous level (where the original image is the first level), applying a gaussian blur, and downsizing the image by a factor of 2. The laplacian pyramid is constructed at the same time by subtracting the gaussian blurred image from the unblurred image at each level, with the resulting image becoming the next level of the laplacian pyramid. We then keep the last (smallest) level from the gaussian pyramid as the last level of the laplacian pyramid.
To construct the hybrid image, we then take the first N levels from the first laplacian pyramid and all of the levels of the second laplacian except for the first N levels and add all of these levels together, resizing as necessary. By taking the first N levels of the first laplacian pyramid, we basically perform a low pass filter on the first image and by taking the last levels from the second laplacian pyramid, we perform a high pass filter on the second image. Thus, when adding the levels of the two laplacian pyramids, we get the low frequencies from the first image and the high frequencies from the second image.