Here, we can make two observations. First, notice that convolving with a gaussian smoothing kernel prior to taking the derivative produced less noisy detections. Even further, the edges themselves are thicker, brighter, and more prominent—represented by connected, smooth lines instead of small, fragmented pieces. This is because the gaussian filter has removed the high-frequency noise and allowed us to more accurately extract the desired low frequency edge information.
Second, notice that we have now done with one kernel what previously required two, and that both of these pairs of images are nearly identical. There may be discrepancies on the order of a few pixels, but these are likely floating point errors or slightly different rounding procedures resulting from the varied order of operations. For all intensive and visual purposes, the combined kernel produces identical results with half of the convolution.
In this section, we derive and use the unsharp masking technique. This technique works by first using a
gaussian
filter to blur the image (lowpass filter), and then subtracting this lowpassed image from the original to
obtain
the details of the image (highpass filter). These details can then be scaled by some factors
alpha
and added back to the original image as sharpening.
Notice that we can once again use the commutativity and associativity of convolution to combine both of these steps into one. As, such we can derive a kernel that integrates alpha, the gaussian smoothing kernel, and the extracted details of the image. We derive it as follows, where Q is the original image, B is the blurred image, \(h_{gauss}\) is the gaussian smoothing filter, and \(h_{\delta}\) is the unit impulse identity.
$$ \begin{aligned} \text{Sharpened Image} &= Q + \alpha (Q - B) \\ &= Q + \alpha \left( Q - (Q * h_{\text{gauss}}) \right) \\ &= Q + \alpha \left( (Q * h_{\delta}) - (Q * h_{\text{gauss}}) \right) \\ &= Q * \left( h_{\delta} + \alpha (h_{\delta} - h_{\text{gauss}}) \right) \\ &= Q * \left( (1 + \alpha) h_{\delta} - \alpha h_{\text{gauss}} \right) \end{aligned} $$
The combined kernel derived above was used to sharpen the following images, allowing for faster computation. Note that the below images depicting "details" are exceedingly faint by nature and are more easily visible if opened in full in another window.
To test the effectiveness of our frequency-based sharpening, we will first blur an image and then attempt to sharpen it again. This is depicted below.
Notice here that although we were able to restore some of the visual detail using sharpening, much of the actual detail is lost during blurring. Increasing alpha further causes many of the regions to become visually distorted. As such, it does a respectable job, although it is unable to reconstruct the detail present in the old image.
We now continue on to the illusionary technique of hybrid images. Using our gaussian lowpass filter from before, we combine the low frequencies of one image with the higher frequencies of another image, to produce an image that looks like two separate things from close and from far away. The images are first aligned to allow for hybridization, and the cutoff frequencies for each filter and hand-picked.
Before creating all of my selected hybridizations, I will test with color on a singular example. Below is a comparison of retaining no color, low frequency color, and both frequencies color. Since I believe that the "both frequencies color" image looks the best, this same style will be applied to the rest of the images.Note that the examples in the below table are for the most part visually appealing. However, the last row hybridizing a door with a tennis court was a failure. The structure and shape of the aligned too well, as to overlap. Further, the high-frequency image (the tennis court) was fairly smooth and didn't contain much detail, and so it is overpowered by the lower frequencies of the door.
Low Frequency Image | High Frequency Image | Hybrid Image (high frequency) | Hybrid Image (low frequency) | |
---|---|---|---|---|
Derek + Nutmeg | ||||
Lebron + Steph | ||||
Baby Expressions | ||||
Tennis Court + Door (Failure) |
In this section we will be creating our own laplacian and gaussian stacks to aid us in our next goal, image blending. A gaussian stack is created by recursively smoothing and downsampling, while a laplacian stack is created by taking the differences of consecutive gaussian stack layers. The following depicts the normalized versions of these procedures on an apple and an orange.
Level 0 | Level 1 | Level 2 | Level 3 | Level 4 | Level 5 | Level 6 | |
---|---|---|---|---|---|---|---|
Mask Gaussian Stack | |||||||
Apple Gaussian Stack | |||||||
Apple Laplacian Stack | |||||||
Apple Masked Laplacian Stack | |||||||
Orange Gaussian Stack | |||||||
Orange Laplacian Stack | |||||||
Orange Masked Laplacian Stack | |||||||
Blended Laplacian Stacks |
In this section we will collapse the blended laplacian stacks above to construct a smoothly blended orapple (orange + apple)! I will also be applying this technique to a few other irregularly masked images as shown below.
Original Image 1 | Original Image 2 | Mask | Blended Image | |
---|---|---|---|---|
Orange + Apple | ||||
Space + Mountains | ||||
Devin Booker + Lantern |
Below I have attached the gaussian and laplacian stacks of the images and masks for both of the other multiresolution blends.
Level 0 | Level 1 | Level 2 | Level 3 | Level 4 | Level 5 | Level 6 | |
---|---|---|---|---|---|---|---|
Mask Gaussian Stack | |||||||
Mountains Gaussian Stack | |||||||
Mountains Laplacian Stack | |||||||
Mountains Masked Laplacian Stack | |||||||
Space Gaussian Stack | |||||||
Space Laplacian Stack | |||||||
Space Masked Laplacian Stack | |||||||
Blended Laplacian Stacks |
Level 0 | Level 1 | Level 2 | Level 3 | Level 4 | Level 5 | Level 6 | |
---|---|---|---|---|---|---|---|
Mask Gaussian Stack | |||||||
Booker Gaussian Stack | |||||||
Booker Laplacian Stack | |||||||
Booker Masked Laplacian Stack | |||||||
Lantern Gaussian Stack | |||||||
Lantern Laplacian Stack | |||||||
Lantern Masked Laplacian Stack | |||||||
Lantern Laplacian Stacks |