Project 2 - Images of the Russian Empire

Part 1: Fun with Filters

Part 1.1: Finite Difference Operator

In this section, we started by calculating the partial derivatives in x and y using the finite difference operator [1, -1] and [1; -1]. To find the partial derivatives, we used the convolve2d function. We then found the gradient magnitude image by taking the square root of the sum of the squared partial derivatives. Finally, we binarized this image by thresholding it qualitatively. Here are the results:

cameraman

Original Picture

Camera Dx

Camera Dx

Camera Dy

Camera Dy

Camera Gradient Magnitude

Camera Gradient Magnitude

Camera Gradient Magnitude Binarized

Camera Gradient Magnitude Binarized

Part 1.2: Derivative of Gaussian Operator

Camera Gauss Dx

Camera Blurred then Dx

Camera Gauss Dy

Camera Blurred then Dy

Camera Gauss Gradient Magnitude

Camera Blurred then Gradient Magnitude

Camera Gauss Gradient Magnitude Binarized

Camera Blurred then Gradient Magnitude Binarized

Here, we see that the noise levels in the derivatives has gone down and the edges are much more prominent and thicker than before.

Gaussian Dx

Gaussian Dx

Gauss Dy

Gaussian Dy

Camera Gauss Dx Applied

Camera with Gaussian Blurred Dx

Camera Gauss Dy Applied

Camera with Gaussian Blurred Dy

Camera Gauss Gradient Magnitude

Camera with Gaussian Blurred Gradient Magnitude

Camera Gauss Gradient Magnitude Binarized

Camera with Gaussian Blurred Gradient Magnitude Binarized

We can see that we get the same result as before.

Part 2: Fun with Frequencies!

Part 2.1: Image Sharpening

Progression of Sharpening:

Taj Mahal Sharpening Progression

Taj Mahal Sharpening Progression

Interstellar Sharpening Progression

Interstellar Wave Sharpening Progression

We also try blurring the image first then sharpening it. We observe that we gain more noise while having more prominent edges. Other details of the wave are lost in the process.

Wave Blur

Wave Blurred

Wave Blur Sharp

Wave Blurred then Sharpened

Part 2.2: Hybrid Images

Cat

Cat

Derek

Derek

Hybrid

Cat Derek Hybrid

Hybrid

Cat Derek Hybrid

Mickey O

Mickey O

Mickey Happy

Happy Mickey

Hybrid

Mickey Hybrid

Hybrid

Mickey Hybrid

Interstellar Crying

Interstellar Crying

Interstellar Crying With Arm

Interstellar Crying With Arm

Hybrid

Interstellar Hybrid

Hybrid

Interstellar Hybrid

In this last case, we see the expression through the hand, so we can consider this a failure case.

Additionally, for the Mickey Mouse hybrid, we can visualize the intermediate frequency analysis:

Spectra

Mickey Spectra

Part 2.3: Gaussian and Laplacian Stacks

Apple Stack

Apple Laplacian and Gaussian Stack

orange Stack

Orange Laplacian and Gaussian Stack

Figure

Replication of Figure 3.42 (Levels 0, 2, 4, then Summed Contributions)

Part 2.4: Multiresolution Blending

Apple

Apple

Orange

Orange

Oraple

Oraple

Young

My Brother (Baby)

Old

My Brother (Older)

Mask

My Brother (Baby Mask)

Ojas Hybrid

My Brother's Age Blend

galaxy 1

Galaxy 1

galaxy 2

Galaxy 2

Galaxy Hybrid

Galaxy Blend

The most important thing I learned in this project was how to apply Fourier analysis to images. This idea blew my mind and I loved visualizing the Laplacian and Gaussian results especially for the picture of my brother.