CS194-26 (CS294-26): Project 2
Part 1.1
Gradient magnitude computation is a technique used in edge detection. In general, edges are areas of an image where high frequencies contact low frequencies. In other words, by convolving with the finite difference operator, the derivatives we are calculating (in whole, the "gradient") is where these edges occur. The derivative is greatest where the edges are. Therefore, this convolution as an image actually serves as a representation of where edges occur. Adding in x and y together gives a more or less complete map of edges of an image.
partial derivative x
partial derivative y
both x and y together to form gradient
binarized edge picture (thresholded)
part 1.2
gaussian blur on original picture
partial x derivative
partial y derivative
both x and y partials together
binarized edge picture
The biggest and most obvious difference is that the edges are more clearly outlined. This would occur because gaussian blurring removes noise in the image, places where the gradient could potentially be high, even though as humans we wouldn't consider that area of the image as an edge. Removing these areas allows us to threshold at a much lower value when binarizing without including noise in the edge image. Therefore, the edges that actually exist are much more pronounced.
Same as before but with a single convolution operation:
partial x derivative
partial y derivative
x and y partials
binarized edge picture
This demonstrates that convolution is an associative operation, instead of convolving (gaussian (image)) (finite difference operator), we did (gaussian finite difference operator) (image), meaning we operated on the image precisely once.
Part 1.3 image straightening
This is the original image:
The best angle is -3
This is the oriented image
This is the histogram for the original orientation
This is the histogram for the optimal orientation
This is the original image:
The best angle is -3
This is the oriented image
This is the histogram for the original orientation
This is the histogram for the optimal orientation
This is the original image:
The best angle is -43
This is the oriented image
This is the histogram for the original orientation
This is the histogram for the optimal orientation
We can see that this is obviously a failure case, this is due to the assumption we make that vertical and horizontal edges implies correct alignment of a picture. While that is true a lot of the time, diamond signs are one notable exception to that.
This is the original image:
The best angle is -2
This is the oriented image
This is the histogram for the original orientation
This is the histogram for the optimal orientation
Part 2.1
Unsharpened image
Sharpened image
Original image
Blurred image
(Re)sharpened image
The level of sharpness seems to be similar between the original image and the resharpened image in that the edges are very clearly defined. However, there is a clear loss of resolution in that areas of the image without clear edges still remain quite blurry.
Part 2.2 hybrid images
Sample: input image 1
Sample: input image 2
Result:
FFT diagram of input image 1
FFT diagram of input image 2
FFT diagram of input image 1 after going through low pass. As can be seen the high frequencies are no longer there.
FFT diagram of input image 2 after going through high pass. As can be seen the low frequencies were removed.
FFT diagram of final hybrid image.
Input image 1
Input image 2
Final hybrid image:
Input image 1:
Input image 2:
Final hybrid image:
I would consider this somewhat of a failure case in that I really see Mona Lisa no matter what distance I am at when viewing the image. I attribute this to the white of the eagle which might cause problems when overlapping different frequencies.
part 2.3 gaussian and laplacian stacks
Gaussian stack for lincoln picture:
Laplacian stack for lincoln picture:
Gaussian stack for hybrid image from previous section. As can be seen only the low pass image from before is clearly recognizable.
Laplacian stack for hybrid image from previous section. As can be seen, although faint, the high pass image from before is what is present in these images (carol christ)
Multiresolution blending for oraple picture.