CS 143 / Project 1 / Image Filtering and Hybrid Images

Example of a hybrid image. From longer distances, the 'cat' appears to be a 'dog.'

Introduction

Hybrid images are static images that change in interpretation as the viewer gets farther or closer away. To create hybrid images, we will use a simplified version of the algorithm presented in a SIGGRAPH 2006 paper by Oliva, Torralba, and Schnys.

The basic idea of the the algorithm is that high frequencies in images tend to dominate human perception when available. However, at longer distances, only lower frequencies can be seen. This leads to an approach where we can create a hybrid image by merging the high frequencies of one image with the low frequencies of another.

Algorithm

We'll proceed by using this set of cat and dog photos as an example.

First, we will need to isolate the low frequencies of an image. We will use the dog image for this, though using the cat image should work nearly as well.


We can isolate the low frequencies of the dog photo by using a standard Gaussian blur filter on it, giving us the image below. The blur has removed many of the fine details and high frequencies from the image, as we intended.

Now we may move on to the cat image, from which we must isolate the high frequencies. Since we know that we can isolate low frequencies by using a Gaussian blur filter, we should be able to isolate the high frequencies by doing the opposite. Thus, we will subtract a Gaussian blurred version of the cat image, containing low frequencies, from the original image, leaving us with only the high frequencies. This gives us the result shown below:

Now that we have both the high frequencies of one image and the low frequencies of the other, we can create a hybrid image. To do this, we can simply add together their values at each pixel. This leads us to the results shown below. To help visualize both the 'cat' and 'dog' aspects of the image, the image has been presented at multiple scales to help visualize the transition.

Other Examples of Hybrid Images

Below are a few more examples of hybrid images created using this algorithm. Note that in all of these examples, the two source images are aligned so as to cause the viewer to perceptually group multiple subjects.

Albert Einstein + Marilyn Monroe

Bird + Plane

The Scream + Mona Lisa

Abraham Lincoln + Adolf Hitler