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
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.
For this part, I created the filter described in lecture, and convolved it with the input image to create the sharpened image.
My Personal Choice:
Blurring an image, then sharpening it
I was unable to get the align_image code to work, so I did not do this part
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.
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: