Build intuition about 2D convolutions and filtering!
I use finite difference operations to show the partial derivative in x and y of the cameraman image by convolving the image with the operators. Then I compute the gradient magnitude image. Finally, I turn this into an edge image by picking the appropriate threshold from the gradient magnitude. $$ D_x = \left[ 1 \ -1 \right], \quad D_y = \left[ \begin{array}{c} 1 \\ -1 \end{array} \right] $$ $$ C_x = \text{cameraman} * D_x, \quad C_y = \text{cameraman} * D_y $$ $$ G_m = \sqrt{{C_x}^2 + {C_y}^2}, \quad G_e =\begin{cases} 1 & \text{if } G_m > 0.2 \\ 0 & \text{otherwise} \end{cases} $$
Trying to use color to enhance the effect. I tried four experiments using my favorite set of images, Efros and the dog. I tried using (1) black and white for both frequency components, (2) color only low-frequency component (3) color only high-frequency component, and (4) both in color.
Algorithm for blending two different images:
Apple Gaussian Stack
Apple Laplacian Stack
Orange Gaussian Stack
Orange Laplacian Stack
Recreation of Figure 3.42
Level 0
Level 2
Level 4
This is my favorite result, and below are the Laplacian stacks generated during the blending process: (Fig. 10 recreation)
Level 0
Level 2
Level 4
Added color to everything!!
I had a lot of fun with this project. The most important thing I learned was that you can do so much with image processing just by playing around with frequencies :) And that Gaussians are super useful in the CV space.