CS194-26 Project 2 Fun with Filters and Frequencies!

Rishi Upadhyay, 3033975663, rishi.upadhyay@berkeley.edu

Project Overview

For this project, we used a variety of different filters to perform image manipulations.

Part 1.1 Finite Difference Operator

The derivatives of the cameraman.jpg image:



The gradient:



After binarization:



The threshold used to binarize this image was 0.28 on a scale of 0 to 1. The gradient computation was done using the following formula: G = (dx^2 + dy^2)^0.5 This is essentially taking the magnitude of the gradient vector which can be thought of as g = [dx,dy]. This value is then binarize using the threshold to get the final edge image.

Part 1.2 Derivative of Gaussian (DOG) filter

The blurred image:



Derivative of Gaussian:



You can see some differences here. The derivatives are smaller/less sharp since the whole image was blurred and most high-frequencies removed already.

With only one convolution where the gaussian filter is convolved with the finite difference filter first.



As can be seen clearly, these two images are in fact the same.

Part 2

Part 2.1 Image Sharpening

Sharpened Taj Mahal with alpha = 1 and 3 respectively:



For evaluation, I used a picture of a deer:



Here is the deer blurred and resharpened:



Part 2.2 Hybrid Images

In this section we created a few hybrid images:



The last one is a failure case where the base images were not very compatible. Because of this, the hybrid image did not turn out very well and you can still see both images. The middle was a combination of a racetrack and a stadium.

For the middle example, I did a more in-depth analysis using FFT. In order: FFT of both input images, FFT of the low-pass image, FFT of the high-pass image, and FFT of the hybrid image.





I also implemented a color version. Here is the stadium image in color:

Part 2.3 Gaussian and Laplacian Stacks

A visualization of the laplacian stacks as seen in Szelski (Ed 2) page 167:









Part 2.4 Multi-Resolution

A library of multi-resolution joined images in color:



The oraple image in greyscale:



The last one was done with an irregular mask that looked like the following. The images blended together are also shown.