I used the unsharp masking technique to sharpen this cat image. I first applied a 5 by 5 Gaussian filter on the image and blur it with sigma 1 and subtracted a scalar multiple k of the blurred image from (1 - k) of the original image. I also make sure the pixel values are within the correct range.
Original
Sharpened (k=3)
I combined the low frequencies from an image with the high frequencies from another image to create hybrid images. When we are close to the image, we see the high frequencies while when we are far way, we see the low frequencies.
Derek
Nutmeg
Derek + Nutmeg
Girl
Boy
Girl + Boy
Cute Corgi
Fierce Wolf
Corgi + Wolf
In the frequency domain, we see images in terms of high and low frequencies. As expected, after high and low pass, the even scatter in the original images changes to become high frequency FFT(brighter) and low frequency FFT(dimmer) respectively.
Corgi's Original FFT
Wolf's Original FFT
Corgi's High Pass FFT
Wolf's Low Pass FFT
Hybrid's FFT
This pair does not work well because of their vastly facial expressions. The old lady has a wide grin that shows her teeth while the baby has his mouth wide opened, resulting in inconsistent textures.
Old Lady
Baby
Old Lady + Baby
To visualize the image at various frequencies, I implemented Gaussian and Laplacian Stacks.
This part blends images by first splitting them into frequency bands, blending each band with a seam and then adding them back into an image. For high frequency bands, a sharper seam is used while a more blurred seam is used for low frequency bands.
Apple
Orange
Orapple
White Cat
Yellow Cat
Blend Cat
Mona Lisa
Frowning White Lady
Smiling Yellow Lady
By deconstructing both images using Laplacian Stack, we can see the composition of the multiresolution blending at each frequency band.
In this part, a gradient domain processing technique called "Poisson Blending" is used to blend the images. This method blends a section of source image into the target image. To achieve this, two values need to be minimized to solve for the value of the pixels placed in the target image, the first being the squared error between the gradient of the new pixels and the corresponding source image pixels, while the second being the gradient between the new pixels and the target image boundary with the corresponding source image pixels such that the pixels on the edge of the image blend well. Hence, a least squares problem solving for the pixels placed in the target image needs to be set up.
Before trying Poisson Blending, for sanity check, I recreated a toy image by solving for an image that matches the gradient of the original image.
Original
Reconstructed
This is my favorite blending result. I first created a mask for the face of Mona Lisa using GIMP Image Editor. Then, to smoothen the seam, I match the gradient within the new pixels to the source image and the edge to the target image. I make sure the target image has a smooth texture such that the blending is not obvious. On the other hand, the texture of the source image is well blended as we do not see any obvious artifacts of the blending.
Mona Lisa
Frowning White Lady
Without Poisson Blending
Smiling White Lady
Running Cat (Source)
Underwater (Target)
Mask
Swimming Cat
Godzilla
Berkeley Marina
Mask
Incoming Godzilla
Poisson blending does not work well for this case because there are lots of details in the space image. Blending the running cat image with the space background causes the stars near the seam to be blurred, resulting in an obvious seam around the cat.
Running Cat
Space
Flying Cat
For this pair, Poisson Blending works better as the colors between two images are better blended. On the other hand, Laplacian Blending preserves the original colors of the two images better. Laplacian Blending works better if both images have small color difference across the seam as it preserve the colors and the textures of the original images better. Poisson Blending works better in most cases but often the color of the source image might seem "washed out" to blend into the target image.
Original Mona Lisa
Original Frowning Lady
Laplacian Blending
Poisson Blending