Ben Freudberg
CS143 Project 1
Image Hybridization
The goal of the project is to create a program that combines two images into one such that looking at the final image from close up it looks like one of the original images and when viewed from far away, it looks like the other.
The two images on the left are the source images. The two on the right are both the result picture, but one is scaled down in order to mimic viewing the image from further away.
The process works by taking the fine detail (high frequencies) from one image and adding it to the coarse parts (low frequencies) of the second image. In this way, the high frequencies dominate your interpretation when viewing the image from very close. When the image is moved further away so that you can no longer make out the fine detail, the lower frequencies of the other image dominate.
The first step of the process is to align, crop, and scale the images so that common features (such as the eyes, if the subjects are people or animals) are lined up with each other. The program then creates a pyramid for each image. The pyramid consists of one set of images that is made by storing the image, then blurring and scaling the image by half, and storing the new image. The process is repeated a user-defined number of times to create the Gaussian image stack. The second set of images, the Laplacian image stack, is the difference in intensity from the un-blurred and blurred images at each level of scaling. Below are the Gaussian and Laplacian stacks for an image.
The last Gaussian image from the stack is used as the base of the image. The Laplacians from the same image are then added to the base up to the user defined cutoff level. The remaining Laplacians are then added from the other image. The result is an image that contains the low frequencies from one image (the base image) and the high frequencies from the second image. When you look at the image from close up, you see mainly the second image but if you look at it from further away, the first image dominates your interpretation. Below are two more example combinations using this program.