CS143 Introduction to Computer Visions

Project 1: Hybrid Images (by Margaret Kim, mk20)

Objective

To create hybrid images with Laplacian pyramids with based on an approached discussed in the SIGGRAPH 2006 paper by Oliva, Torralba, and Schyns.

Hybrid Images

Hybrid images are defined to be static images that "change" based on the distance of the viewer. They are produced through a combination the low spatial frequencies of one picture with the high spatial frequencies of another picture.

Algorithm

To create the low and high spatial frequencies of a picture, one needs to first create the Gaussian pyramid and the Laplacian pyramid for both images.

An image pyramid is a type of multi-scale signal representation in which an image is subject to repeated smoothing and subsampling. For the sake of clarity, the numbering of the levels from top to bottom levels is from 1 to N.

A Gaussian pyramid is a type of image pyramid in which the smoothing technique is accomplished using Gaussian blur. The Gaussian pyramid represents the low spatial frequencies of the picture.

On the other hand, the Laplacian pyramid represents the high spacial frequencies. A Laplacian pyramid can be generated by using Laplacian transform instead. There is an alternative way to generate a Laplacian pyramid. For each level N of the Laplacian pyramid, one can take the difference between the image at level N-1 of the Gaussian pyramid, and a copy of the image that has underwent the Gaussian blur filter before subsampling. To create the Laplacian pyramid for this project, I used the latter method.

After creating the pyramids, one must combine the levels of the pyramids.

Given two images, image_A and image_B, to show image_A at close up but image_B at a far distance, I combined the lowest level of the Gaussian pyramid of image_B, the lower levels (from k to N) of image_B Laplacian pyramid, and the higher levels (from 1 to k-1) of image_A Laplacian pyramid. Only one level of the Gaussian pyramid was included in the summation because otherwise the resulting hybrid images were too intense. By tweaking the number of levels in a pyramid, the cuttoff level, and also the hsize and sigma for Gaussian blur filter, I successfully created hybrid images.

Results

Derek and Nutmeg (the cat)

Derek Nutmeg
Derek and Nutmeg

Cat and Dog

Cat Dog
CatDog

Marilyn and Einstein

Marilyn Einstein
Marilyn and Einstein

Creepy Baby Grows Up

Baby Grandma
Creepy baby grows up to be creepy grandma

Galaxy Flower

Rose Milkyway
Rose and Galaxy

Pirates of the Carribean

Jack Sparrow POTC Skull
Jack Sparrow and the Skull