We use the finite difference as our filter for the x and y directions:
$$ D_x = \begin{bmatrix} -1 & 1 \end{bmatrix}, \quad D_y = \begin{bmatrix} -1 \\ 1 \end{bmatrix} $$
Then we convolve the image by filters with respect to x and y, and calculate the gradient magnitude like so:
$$ G_x = Im * D_x, \quad G_y = Im * D_y, \quad G_m = \sqrt{G_x^2 + G_y^2} $$
Given the previous approach was clearly noisy, we can apply Gaussian blur to try to reduce noise, where G is the 2D Gaussian filter. I notice that the one that has been blurred prior has darker edges and less noise, such as from the grass. The edges are also a bit rounder. A similar effect can be achieved by taking the derivative of the gaussian filters and then convolving with the difference filters to achieve the same effect with a single convolution.
Original
Binarized Gradient Magnitude
Derivative of Gaussian to Reduce Noise
Original
alpha = 0.25
alpha = 0.5
alpha = 1
alpha = 2
alpha = 4
alpha = 0.5
alpha = 1
alpha = 2
Additionally, I tried to sharpen a blurred image. It is clear that the blurred image when sharpened is not as clear as the original, as it has a lot more noise and artifacting. This is because blurring loses information.
Original
Blurred
Blurred then Sharpened with alpha = 4
Derek Low Frequency
Nutmeg High Frequency
Hybrid
Derek Original Fourier Transform
Derek Filtered Fourier Transform
Nutmeg Original Fourier Transform
Nutmeg Filtered Fourier Transform
Hybrid Fourier Transform
Sprite Low Frequency
Coke High Frequency
Hybrid
Richard Low Frequency
Lebron High Frequency
Hybrid
I think the hybrid of Lebron and I was a failure because our faces are opposites in a way. I have a lot of hair while Lebron is balding, and Lebron has a lot of facial hair whereas I have none. Thus, it is difficult to make a convincing hybrid image.
Apple Laplacian Stack 0
Apple Laplacian Stack 1
Apple Laplacian Stack 2
Apple Laplacian Stack 3
Apple Laplacian Stack 4
Apple Laplacian Stack 5
Orange Laplacian Stack 0
Orange Laplacian Stack 1
Orange Laplacian Stack 2
Orange Laplacian Stack 3
Orange Laplacian Stack 4
Orange Laplacian Stack 5
My Merged Oraple
Laplacian Mask Level 1
Laplacian Mask Level 3
Laplacian Mask Level 5
Laplacian Mask Level 1
Laplacian Mask Level 3
Laplacian Mask Level 5
Day
Night
Blended
Laplacian Mask Level 1
Laplacian Mask Level 3
Laplacian Mask Level 5
Laplacian Mask Level 1
Laplacian Mask Level 3
Laplacian Mask Level 5
My Sister
Racket
Blended
I used a vertical binary mask similar to the oraple for the desert day and night blending, with the only difference being the dimensions which were modified to match the image. For the blend with my sister and the tennis racket, an irregular ellipse-shaped mask was used.
For my bells & whistles, I implemented color for every aspect in at least one image. I found that for the hybrid images, color in both images worked best, and I did this for the Derek-Nutmeg hybrid. I also blended with color, and I think color is instrumental to good blending because it makes the effect that much more powerful.
In this project, I think the most important thing I learned is how operations can be combined to use only one convolution operation, which can be very useful. An example of this was the unsharp mask filter instead of subtracting a blurred image to isolate high frequencies, and then adding them.