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

Author: Kevin Ji

1.1: Warmup

The images below are all processed with σ = 2 in the order of α = 0 (original), 1, 2, 4, 8, 16. In the photos shown below (zoom in to see the effect), as α increases, the sharpness of the edges of the letters increases, creating noticeable artifacting.

1.2: Hybrid Images

For each of the photos below, I first aligned the images to be of the same orientation, and cropped off the useless edges. I then took the average of the low pass filter of the first image (with σ = 1.5) and the high pass filter of the second image (with σ = 10).

I merged together the images in color by computing the low-pass and high-pass filters separately for each R, G, and B layer. Because the FFT graphs look almost identical per layer, only one of those graphs is included for each hybrid image. It turned out that using color for both components produced the best results, so those are the results shown below.

Derek and his cat Nutmeg

This was the example image given. Derek definitely has catlike features now.

Albert Einstein and Walter White

After the merge, Walter White looks a lot less intimidating with Einstein's facial features. The two suits merged fairly well together.

Donald Trump and an orange (failure)

To make the orange less noticeable, I used σ = 3 for its high pass filter, but the results were still not as great as I expected.

1.3: Gaussian and Laplacian Stacks

The Gaussian stacks were produced by continuously calling the Gaussian filter on the previous image in the stack; the Laplacian stacks were produced by taking the differences from the corresponding Gaussian stacks.

Lincoln and Gala

Albert Einstein and Walter White

1.4: Multiresolution Blending

I used the Gaussian and Laplassian stacks implemented in the previous section for multiresolution blending. All of the below images used independent blends for each of the R, G, and B layers to produce a final, colored image.

Oraple

Eiffel Tower–Space Needle (failure)

Coffee Cup–Black Hole (failure)

This blend (pun not intended) used an irregular mask.

2.1: Toy Problem

As seen below, the original and reproduced images look identical.

2.2: Poisson Blending

For each combined image, I used a sparse matrix solver to satisfy the constraints necessary for Poisson blending. For my custom images, the source and target images were resized to be the same size, and the masks were created via Photoshop.

Penguin with Humans (part 1)

Penguin with Humans (part 2)

The penguins merged very well with the snow in the ground, but with a slightly elevated mask so that the penguin is halfway between the snow and the grass (not pictured here), the colors of the penguin look very off, as the Poisson blending works best when the surrounding pixels of the target image are roughly the same relative magnitudes as the surrounding pixels of the source image.

Coffee Cup–Black Hole

The results of the coffee cup–black hole merge here are much better than the multiresolution blending results above, which makes sense, as the Poisson blending algorithm does a better job of merging the source image with the destination's background pixels.