Move slider to zoom.

# Project 1: Hybrid Images

### Objective

The objective of this assignment is to combine two unique images into a hybrid image. From a distance, the hybrid image should look like the first image. The hybrid image should look like the second image up close.

### Algorithm

I implemented the algorithm described in the 2006 SIGGRAPH paper by Oliva, Torralba and Schyns. Essentially the algorithm passes one image through a high-pass filter and the other image through a low pass filter. These images are combined to create the hybrid.

After experimenting with the algorithm described in Oliva's paper, I decided to make a few slight modifications. Rather than combining only the high pass and low pass images, my algorithm takes the Gaussian image and adds a small amount of edge data from the low pass image. Then it iteratively adds levels of the Laplacian pyramid.

More specifically, the algorithm can be divided into the following steps:

1. Align the two images
2. Create Gaussian and Laplacian image pyramids for both images
3. Choose two cutoff-frequencies: G and L
4. Select the Gth level of the low pass image's Gaussian and Laplacian image pyramids
5. Add L through 1 levels of high pass image's Laplacian pyramid.
6. Crop the resulting image

### Results

In general, I had fairly good results. My algorithm was highly dependent on a the pair of sample images, intelligent alignment and proper choice of cutoff-frequency values. There were some images that combined very poorly. However, I think that is a reflection of the task rather than my algorithm.

### Sample Data

I created three hybrid images from the sample data.

1. Cat + Dog. This was the first image I got working.
2. Einstein + Marilyn Monroe. This pair of images worked exceptionally well. I think there are several reasons it exceeded my expectations. First, the tips of both subject's noses are somewhat similar. Second, Einstein is often characterized by his hair which disappears when the image is viewed from a distance.
3. Car + Rhino. Oddly, this hybrid image works better in color than black and white. It was the first hybrid color image I made. After some experimentation, I saturated the image of the rhino and then followed the normal process.

### Other Images

I played around with a bunch of other image combinations for fun. Some worked well, some did not.

One combination that worked well was "Baby Einstein". After this success, I found more baby photos through Flickr Interesting.

A picture of a baby biting his hand paired well with a picture of a doll. To create this color hybrid image I saturated the image of the doll and aligned it so the baby's eyes would be very obvious. The result is very creepy.

The next hybrid image is a combination of paintings by Leonardo da Vinci: Lady with an Ermine and a horizontal flip of the Mona Lisa. Again, I think one of the reasons this turned out well is because the faces have similar structures. The popularity of the Mona Lisa may also help: when testing which hybrid images 'worked' I found that famous pictures had better results.

My final hybrid image is Afghan Girl + Derek. The prominence of the Afghan Girl photograph seems to aid recognition: some have a hard time seeing the picture of Derek. The color of the Afghan Girl's scarf might also contribute to a 'grouping cue' that removes the viewer's attention from Derek's admittedly faint features.

### Creating Color Hybrid Images

As I previously mentioned, not many modifications were required to create decent color hybrid images. Saturating one of the images usually helped, but sometimes had no effect. However, selecting good pairs of color images is harder - uniform color can sometimes be too strong of a grouping cue.