CS143 Introductio to Computer Vision: Project 1 Hybrid Image

Jixiong Wang (jameswang@cs.brown.edu)

 

The goal of this assignment is to create hybrid images using a modification of the approach described in the SIGGRAPH 2006 paper by Oliva, Torralba, and Schyns.

Algorithm

The algorithm used in practice attempts to merge the low-pass filtered version of one image and the high-pass filtered version of another to produce the hybrid image by three steps as below:

  1. Images need first to be aligned in order to achieve a nice perceptual grouping effect. The code related is provided in the stencil. What we will do is to choose two pairs of points from the two images so that the two pairs of points will share the same coordinates in the hybrid image.
  2. Gaussian and Laplacian pyramids will be generated for both images. In the Gaussian pyramid, each level has half the resolution of its parent level. The reconstructed low-pass versions of the original image are computed by upsampling images in the Gaussian pyramid. Then we need to subtract these blurred versions from the original to produce the Laplacian pyramids holding the high-pass information. The sample Gaussian and Laplacian image pyramids look like:

  3. The last step is to set the cutoff-frequency properly by choosing images in the pyramids to include in the sum:

    H=I1∙G1+I2∙L2

    As the formula indicates, the result hybrid image is the combination of the low-pass filtered version of the first image and the high-pass filtered version of the second image.

Results

Hybrid images using provided source images

  1. Albert Einstein and Marilyn Monroe:

  2. Derek and his former cat Nutmeg:

  3. Audi and rhino:

  4. Dog and cat:

Other hybrid images

  1. Barack Obama and Lady Gaga:

  2. One interesting application listed in the SIGGRAPH 2006 paper by Oliva, Torralba, and Schyns is the private font to use hybrid images to display text that is not visible for people standing at some distance from the screen. I made such one simple hybrid font as below:

    When we are closed to the screen, we can see the text "We are safe. Everything is OK". However, this text becomes invisible at few meters and the "SOS" sign is seen.
  3. Friend or enemy:

    Be careful of the guy standing before you. He seems a nice friend. However, after you step back much further, he will reveal his evil face.

Images using colors

We will try using color to enhance the effect. First, we use color only at high spatial frequencies to enhance the car. We can see the original hybrid image versus the new one:

Second, only color at low frequencies is used:

We see that the colors of the rhino picture dominate the result. Ever if we use color for both the images to be merged, the result is similar:

In fact, the low-pass filtered version of the image holds more color information than the high-pass. Therefore, to use color for the low-frequency component will often significantly reduce the perception of the high-frequency component of the other image. However, to use color only for the high-frequency component will produce a better hybrid result.

References

  1. Aude Oliva , Antonio Torralba , Philippe G. Schyns, Hybrid images, ACM SIGGRAPH 2006 Papers, July 30-August 03, 2006, Boston, Massachusetts
  2. R. Szeliski. Computer Vision: Algorithms and Applications. Springer, 2010.