Yash Vanvari CS 194-26 Project 2 Fun with Frequencies


Part 1.1 Finite Difference Operator

In this part we took a look at the finite differnece operator on the following image.

Original Cameraman

Below are the different results I received on computing the dx, dy, gradient magnitude, and binarized gradient magnitude.

Cameraman, Dx
Cameraman, Dy
Cameraman, gradient magnitude
Cameraman, binarized gradient

With this approach it was slightly harder to get all of the edges while leaving out the noise, as a result we need to apply some other image processing technicques in order to get better results

p

DoG Filter

One approach we can try is applying a guassian filter to the camperman image first and then computing the the partial derivatives

Below are the different steps in the process of applying the guassian and then finding the edges and also the output images of taking a derivative of the guassian filter itself before producing the same result. The gradient magnitude image was calculated by taking the square root of the sum of squares of the partial derivatives: ((df/dx)^2 + (df/dy)^2)^1/2

Blurred Camerman
Dx, blurred camerman/figcaption>
dy, blurred camerman
gradient produced from the blurred image
Binarized GRadient normally computed with the blurred image.
Binarized gradeint from DoG filters

The major differences between this model and the previous one was that we were able to capture more of the buildings in the background and the binarized gradient had a much thicker outline for the edges. The reason this happened is because when we blurred the image, we also blurred the edges a bit so it's signal get's picked up. As a result, during the binarization process that smudged edge gets picked up and amplified into a thick outline.

Part 1.3 Image Rotations

In this part we created image rotations in order to straighten images.


Test Image - Success

Original test image
Original test image, straigtened
Rotation angle graph for the test image

Bus Image - Success

Original bus image
Bus image, straigtened
Rotation angle graph for the bus image

House - Succcess

Original house image
House image, straigtened
Rotation angle graph for the house image

Living Room - Fail

Original Living Room image
Living Room image, straigtened
Rotation angle graph for the living room image

Part 2.1 Image Sharpening

In this part focused on shaprning images by adding in more high frequencies into the images, Below are the results on one sharp image, one blurr image, and one normal test image

Original Taj mahal image
Sharpened Taj Mahal image
Original Blurry City Image
Sharpened Blurry City Image
Original Sharp image
Sharper sharp image

Part 2.2 Hybrid Images

In this part we combined images in order to produce hybrid images, such that we have the low frequencies from one image and the high frequencies for another iamge

This is the combination for the test images.

Picture of person
Picture of cat
Combined image of both.

This is a combination of a happy emoji and sad emoji

Picture of happy emoji
Picture of sad emoji
Combined image of both.

This is a combination of a phone and a bannana

Picture of bannanas
Picture of iphone
Combined image of both.

Below are the FFT domains of the happy, sad, and combined emoji pictures

FFT of happy emoji
FFT of sad emoji
FFT of both images combined.

Part 2.3 Laplacian and Guassian Stacks

In this part we focused on creating both Laplacian and Guassian stacks.

This is the Guassian stack for mona lisa

First Level of Guassian Stack
Second Level of Guassian Stack
Third Level of Guassian Stack
Fourth Level of Guassian Stack
5th Level of Guassian Stack

this is the Laplacian stack for Mona Lisa

First Level of Laplacian Stack
Second Level of Laplacian Stack
Third Level of Laplacian Stack
Fourth Level of Laplacian Stack
5th Level of Laplacian Stack

this is the guassian stack for the hybridized emoji picture

First Level of Guassian Stack
Second Level of Guassian Stack
Third Level of Guassian Stack
Fourth Level of Guassian Stack
5th Level of Guassian Stack

This is the Laplacian stack for the hybridized emoji picture

First Level of Laplacian Stack
Second Level of Laplacian Stack
Third Level of Laplacian Stack
Fourth Level of Laplacian Stack
5th Level of Laplacian Stack

Part 2.4 Multi Resolutional Blending

Finally, I combined images together so that they could blend together

Oraple - Test images with normal mask

Orange
Apple
Orange + Apple = Oraple

Emoji transition with normal mask

Happy
Sad
Transition

Sun + the moon in the center

Sun
Moon
Mask Used
Sun + moon in the centers

Finally below is the laplacian images that constructed the image at each level. First off for the sun

Next is the moon

Overall I learned a lot with this project espescially about how frequencies and filters work. In particular, I think I udnerstand the use cases of a Guassian Filter and definitely got a chance to much better understand low pass filters and high pass filters and how they affect the way in which we perceive images.