CS194-26

PROJECT 3

Fun with Frequencies and Gradients!

Allen Cao (cs194-26-afj)



Part 1

Warmup

This is a sharpened picture of a cat. This "sharpening" filter was obtained by subtracting a gaussian filtered blur from the original picture, leaving a "detail" layer that was added back to the cat that adds detail.

Hybrid images

These are hybridized pictures. We combined pictures according to the paper by combining a high-pass filter on one photo and a low-pass filter on the other. We first align the two pictures throught the given algorithm to make sure the faces/whatever you want match. The high-pass filtered image is easier to see up close, while from fartehr away the low-passed image is easier to see. The original two pictures, then the hybridized picture are shown. The low-pass and high-passed pictures, respectively are then shown. This is for each pair of pictures!

The final pictures have weird creases because the alignment doesn't crop the picture, resulting in artifacts when trying to hybridize them.

My favorite result is Derek-cat

The last one didnt work so well, because the images don't align well.

Here are the fourier graphs for the Derek nutmeg picture. They are fourier logarithm graphs for Derek, the cat, the low-passed Derek, the high-passed Cat, and the hybridized image respectively (from left to right and up to down).

Gaussian and Laplacian Stacks

To build the Gaussian and Laplacian stacks, we set a starting sigma, and then repeatedly filter the image, doubling this sigma each time. Unlike a pyramid, stacks do not decrease in size, but instead preserve the original image dimensions. The original image is shown on the left, then its Gaussian stack is shown above and Laplacian stack below for each image. Six levels are shown, with the sigma doubled each time all the way to 32.

Multiresolution Blending

We achieve multiresolution blending by applying a mask to two images at different levels of their Laplacian stacks. We apply the Gaussian-filtered masks to these stacks to combine the images at different stages of blur, so that the seam itself is smooth, rather than abrupt. The Laplacian stacks allow this smoothing to occur "naturally".

Here are the stacks for the rubiks cube. The gaussian stacks for each are shown first, then the laplacian stacks.


Part 2

Poisson blending is a method of gradient-domain processing that focuses on maintaining the gradient of the ousrce instead of the color of the source map onto the target. We optimize this process by calculating the least square of the source's neighbor pixels on the target.

Toy Problem

We want to reconstruct the image by recreating the gradients of the original image pixel by pixel from each pixel's bottom right; using these constraints and the top-left pixel we run a least-squares on the equation Ax=b, where x is the final result. Below are the original and reconstructed images using this method.

The most important part of this project I learned was that image processing is both more simple and more complex than I thought; images can be easily compiled and processed and added together, but we can apply lots of powerful techniques to manipulate them.