CS 194-26 Intro to Computer Vision and Computational Photography

Programming Project 2: Fun with Filters and Frequencies!

By Alek Petuskey

Part 1: Fun with Filters

First I convolved my image with the finite difference operators Dx = [[1, -1]] Dy = [[1], [-1]]. The results of this are shown below.

drawing

I then combined these two images to get the gradient magnitude. I also obtained the binarized gradient magnitude where everything above a certain threshold was set to 1, and everything below that threshold became 0. While not perfect the images reasonably show the significant edges of the image.

drawing drawing drawing

Part 1.2: Derivative of Gaussian (DoG) Filter

I then smoothed the image with a gaussian filter, resulting in a blurred camera man.

drawing drawing

As per the instructions I first appl;iad the guassian filter on the original image and then took the x and y gradiant. I then took the x and y gradients, followeing that then applied the guassian. These two procedures as expected obstasined the same result.

drawing drawing

Part 1.3: Image Straightening

For straightening photos I used the followig method. I tested rotatiom angles from -10 degrees to 10 dregrees. At each rotation computed the edges of the images by blurring it and then using the finite difference operators to find the true edges. One case that struggles was the chess pieces. Here there is a mix of l;ines in differetn direction so there is no clear optimal way to rotate the image in a range of -10 to 10 degrees. One improvement may be to increase the range of search.

drawing
drawing
drawing
drawing

Part 1.3: Bells and Whistles Fourier Domain.

In Fouier domain a verticle line shows up as a horizontal line and vice versa. I used a similar technique to the reqular part of the question except I tranformed the image in the forier domain. This seemed to acheive decent results somewhat mirroring the rotations in the original implementation.

drawing
drawing

Part 2.1: Image "Sharpening"

Below are the original, sharpened, and blurred images.

drawing
drawing
drawing

Part 2.2: Hybrid Images

Given Image

drawing
drawing

Favorite Image

drawing
drawing

Other Hybrid Images

While I had sucess matching up faces, one case that failed was when I tried to match fruits up. This is because thier shapes are different so the high frequency of the rqasberry can be seen from a distrance away. While the result is ok this could be better improved by picking photos that closly match up in features.

drawing
drawing

Bells and Whistles

I used color to enhance the effect of the blend. I found the having both colors worked well. However, I also tried having the low frequency color and high frequency not color that way the effect of walking back would show the low frequency more. I found having high freuency color and low frequency not color did not work as well as i anticipated.

drawing
drawing

Part 2.3: Gaussian and Laplacian Stacks

drawing
drawing
drawing
drawing

Part 2.4: Multiresolution Blending (a.k.a. the oraple!)

Oraple

drawing
drawing
drawing
drawing

Space

drawing
drawing
drawing
drawing

Shark

drawing
drawing
drawing
drawing

Shark-Pond

This last one struggled a bit due to a mismatching in background colors. One solution would be to edit the mask so less of the shark background would show, but then it would end up hurting the idea of bleanding the backgrounds.

drawing
drawing
drawing
drawing