Rishi Iyer: CS194-26 Project Two

Part 1.1

To obtain the partial derivatives of the image with respect to x and y, I convolved the image with the finite difference operators Dx and Dy. Then, to obtain the gradient magnitude image, I took the square root of the sum of the squares of the partial derivatives. Finally, to obtain the edge image, I set the pixel values above a certain threshold to 1, and the values lower to 0. The threshold I set was 0.2

Dx
Dy
Gradient
Edge

Part 1.2

In this part, before applying the operations from Part 1.1, we blurred the image using a Gaussian Filter. This produced a clearer partial derivative compared to the version without the blurred image. To reduce the number of convolutions, I computed the x and y derivatives of the Gaussian Filter and convolved it with the blurred image. This produced the same result.

Blurred Image
Blur Dx
Blur Dy
Blurred Gradient
Blurred Edge

Part 2.1

For this part, I created the filter described in lecture, and convolved it with the input image to create the sharpened image.

Taj
Taj Sharpened (Alpha = 1)

My Personal Choice:

Toaster
Toaster Sharpened (Alpha = 10)

Blurring an image, then sharpening it

Original
Blurred
Sharpened (Alpha = 2)

Part 2.2

I was unable to get the align_image code to work, so I did not do this part

Part 2.3

In this part, I implented the Laplacian and Gaussian Stacks, and applied the result to the Oraple image. Below is the visualization of the laplacian stacks of the apple and orange, as well as the blended image.

Part 2.4

In this part, I created a mask guassian stack, then applied the respective parts of the mask to the apple and orange laplacian stacks. I then added those two applied stacks together, and flattened the pyramid to create the oraple output. Below is the mask and the result of the mask being applied to the apple and orange, as well as the sum of the apple and orange masks

Here is the blend process applied to a night and day photo from a timelapse of New York:

Day
Night
Blended