CS 194-26 Project 3: Fun with Frequencies and Gradients!

Jeffrey Wang (cs194-26-acl)

Part 1: Frequency Domain

Sharpening results with sigma = 1.5, alpha = 10. The image I used was a blurry picture of a city, and I also included an overlay of the images to denote which areas were specifically sharpened with my function, too.


First attempt, used the values (6, 10) for the cutoff frequencies. This was done by taking the aligned images and applying a low-pass filter to one image while applying a high-pass filter to the other, then merging the two by taking their average.

By far my favorite results, using a picture of Channing Tatum and Zac Efron with the cutoffs (8, 10). Also a comparison to the originals lined up in case people don't know what they look like.

Not as sharp results, since the panther's body doesn't really match up with the cats. Although it still has the effect of looking like a distinguishable panther close up and a black cat from afar.

A failed attempt at making a hybrid of Zooey Deschanel and Taylor Swift. The hair kind of messes things up.

Original frequencies for Zac and Channing, respectively.
Lowpass and Highpass filtered frequencies for Zac and Channing, respectively.
Resulting frequency analysis of the hybrid.
Results from trying to use color to enhance the effects in "both", "high", and "low" orders. It's pretty hard to see a big difference on the Zac + Channing images, but I felt like using color in the high frequency domain for Zooey and Taylor had better results, as I felt it was slightly easier to tell Talor and Zooey apart.

I used 5 levels for my Gaussian and Laplacian Stacks. The original image is on the left of both stacks, with the Gaussian Stack on top and Laplacian Stack on bottom. My favorite result was the Zac + Channing hybrid, and I illustrate the stacks right here.


Using my resulting Gaussian and Laplacian Stacks, I summed up the Laplacian Stacks of the original images applied with the Gaussian Stack of the mask (in this case a step function), and then summed the results together along with the last image on the Gaussian stack of each original image as per the equation in the article. The sigma values I used were 2, 4, 6, and 8.

By far my favorite results!! Death Star + Nature along with the mask I created using getMask.

A bit weirder of a result Let's just call it "Vader's Ghost".


(Short description) In this part of the project, we make use of gradient domain processing and Poisson blending in order to seamlessly blend two images. This is done by recalculating the pixel intensities from the source image to the target image using the intensities of the source and target images' pixels.

The implementation for this part was a bit tough. But in the end I was able to get results with an error of 0+8.534e-05i, so essentially 0.

My favourite blending result. Blending an... attractive picture of my friend with Childish Gambino's album cover. The blue hue sort of leaks into my friends face a bit, but the overall result is comedic and relatively smooth. I redid my implementation to make it such that my im2var would only map the mask values, instead of having to go through all values of e.

Two more results from Poisson Blending.
These results didn't turn out as good. Probably due to the large contrast of colors in the images.

The Poisson Blending seemed to work better with these results, although since I didn't implement color in the pyramid blending, it is a bit hard to tell. I think in general using Poisson Blending is strong when the surroundings are more similar, while using pyramid blending is better when using images that are relatively dissimilar.