< Fun with Filters and Frequencies!

Fun with Filters and Frequencies!

CS194 Project 2
Maya Hammond


Overview

The purpose of this project is to play with different frequeinces and filters within images in order to creat different results.


Part 1

1.1 : Finite Difference Operator

"Camera Man"

Here, I convolved the images with the DY,DX filters,with [1, -1] and [[1], [-1]], to get the partial derivatives of the image. Then I calculated the gradient magnitude, by fiding the square root of the sum of the square of the derivatives.Then i was able to display the binarized image and look at the edges.

"Filtered Camera Man"

1.2: Derivative of Gaussian (DoG) Filter

In order to deal with noise, I applied a Gaussian filter with a sigma of 2.5. I convolved the dy and dx with the gaussian kernel. After this I was able to binarize it.The edges in this image were much thicker than in 1.1, though otherwise it was the same.

"Camera Man with Gaussian Filter "

1.3 : Image Straightening

I was able to use the gaussian filter to look at the edges, than I was able rotate the image on a scale of (-5,5). As I did this I was able to sum up the number of straight edges and evaluate these in a histogram. Than I looked at the histogram with the max number of straight edges and rotate the image by this angle.

Facade
Straighted
"Histogram"
"House"
"Straighted House"
Histogram

Part 2

2.1 : Finite Difference Operator

I got a low frequency image by applying the gaussian filter to the image, and subtracted that from the image to get the high frequeinces of the image. Than I add this high frequences back to the orginal image to sharpen it.

"Taj"
"Sharpened"
"Powder Puff"
" Blurred Powder Puff"
"Powder Puff Sharpened"

2.2 : Hybrid Images

The iages look the like the blurred same image up close. Though you see the differences of the images from a far. The high frequncy is easier to see up close, and the low freqency is more visible from a distance.I chose to align my images in the eyes. I combined the high frequency of one image with the low frequency of the other image.

"Cat"
"Man"
"Hybrid"
"image1 "
"image 2 "
"My hybrid "

I think part of the reason that this one did not merge as well was because of the varations of sizes of the face, though you still see the low and high frequencies.

Part 2.3: Gaussian and Laplacian Stacks

I implemented a Gaussian stack with 5 levels.In each level I implemented the gaussian filter, starting with a sigma 2.5 and multiplying it by 2 each time. I implemented the Laplacian stack by finding the Gaussian stack for the image and subtracting each image from the image one position before in the stack.

"Gaussian Stack "
"Laplacian Stack "

Part 2.4: Multiresolution Blending

I used the gaussian stack on both of the images and the laplacian stack on the mask. I used the formula for and techniques from Burt and Adelson's 1983 paper on Multiresolution Spline. I summed these stacks togther to get a combination of my to images.

"Apple "
"Orange"
"mask"
"Orapple"
"Lepoard "
"Tiger"
"Liger"

The reason my Multiresolution do not show up as well is because my low frequeinces are very low and my high frequencies are very high.

Overall this project was very fun and I really enjoyed it. I learned a lot manipulating with the pictures.