Project 1 Report

By Andersen Chen



Big Picture!

Small Picture!

Algorithm

Given two pictures, we want a hybrid image that mashes the high frequencies of one picture with the low frequencies of the other.

To extract the frequencies a picture, we first use a low-pass filter, the Gaussian filter provided by Matlab. For each picture in our pyramid, we apply a low pass filter on the original. We start off with a Gaussian filter that has a standard deviation of 1 pixel to create the first picture in our Gaussian pyramid, then double the standard deviation for each successive picture in our cell. Note that we are not downsampling and blurring, and that the Gaussian filters are not being composed on each other; instead, we are just increasing the standard deviation of our Gaussian and generating our Gaussian pyramid by applying filters to copies of the original image. Downsampling seems unncessary; one would have to scale up the downsampled Gaussians and Laplacians to make the hybrid image anyway, and the current implementation produces the same results. In addition, composing Gaussian filters seems unneccessary as well. The composition of two Gaussians is just another Gaussian which has a standard deviation that is the square root of the sum of the squares of the standard deviations of its composing filters. We can just take the original image and apply a bigger Gaussian directly.

To generate the Laplacians, we simply take the image in the ith element in our Gaussian pyramid and subtract its pixel values from the (i+1)th element in the same pyramid. This way, we isolate the frequencies that each Gaussian filtered out.

For two images, we compute their respective Gaussian and Laplacian pyramids. Then, from the picture that we want high frequencies of, we take elements 1 through cutoff1 from the Laplacian, which represent the high frequencies of that image, and add them together. Then, from the picture that we want low frequencies of, we take the last elements of its Laplacian, starting at the picture at index cutoff2, and then add these to the previous sum. We then add on the last element from its Gaussian, which has the very low frequencies that the Gaussians haven't filtered out yet. Cutoff1 and cutoff2, along with the number of pictures in our Gaussian pyramid, are parameters of our choosing.


As one can see, the results of the algorithm seem to work.

Results

Some more hybrid pictures!

Einstein and Marilyn Monroe

Cat and Dog

Cat and Derek


Gaussian Pyramid for Steve Jobs (top to bottom, left to right):

Laplacian for Steve Jobs (added 0.5 to pixel values):


Gaussian Pyramid for Bill Gates (top to bottom, left to right):

Laplacian for Bill Gates (added 0.5 to pixel values):

MOAR PICTURES!