Project 3: Fun with Frequencies and Gradients

By: Nikhil Sathe

Part 1: Frequency Domain

Part 1.1: Image Sharpening

The goal for this part was to use the unsharp technique to generate a sharpened image. The unsharp technique involves creating a high pass filter by subtracting the gaussian filtered image from the original image, and then adding those high frequencies multiplied by a factor ɑ to the original image. The formula is as follows: f_sharp = f_orig + ɑ(f_orig - (f * g)). The results are shown below.

Original Sharpened

Part 1.2: Hybrid Images

The goal for this part was to generate hybrid images by blending a low-pass filtered image with a high-pass filtered image. The concept of a hybrid image is based on changes in perception based on distance from the image. From far distances, the low frequencies are more dominant, and thus the low-pass filtered image can be seen clearly. As the distance from the viewer to the image is decreased, the higher frequencies become more noticable, and the hybrid image will now appear as the high-pass filtered image.

Bells and Whistles: The results shown below are generated in color.

Low Pass High Pass Hybrid Image

Here is the Fourier analysis for the Warren Buffet and Bill Gates hybrid image.

Low Pass High Pass Hybrid Image

Part 1.3: Gaussian and Laplacian Stacks

The pictures below are examples of the gaussian and laplacian stacks. The gaussian stack is the result of applying the gaussian filter to the original image at multiple levels. The laplacian stack is the difference between each level of the gaussian stack.

Results

Original Level 1 Level 2 Level 3 Level 4

Hybrid Image Results

Part 1.4: Multiresolution Blending

The goal for this part was to seamlessly blend two different images using vertical or horizontal masks. The procedure involved generating the gaussian stack for the mask and laplacian stacks for the images and then applying the following formula to those stacks: I = ɑIleft + (1 - ɑ)Iright. The last image result in the collection below is generated using an irregular mask.

Bells and Whistles: The results shown below are generated in color.

Image 1 Image 2 Blended Image

The pictures below are examples of the laplacian stacks for the earth and venus blended image.

Original Level 1 Level 2 Level 3 Level 4

Part 2: Gradient Domain Fusion

Part 2.1: Toy Problem

The goal for this part was to reconstruct the sample image shown below by first computing its gradients and then applying constraints to minimize those gradients. This optimization problem was solved using the least squares method where the total number of constraints is 2xy + 1 ('x' is the width of the image in pixels and 'y' is the length of the image in pixels).

Original Reconstructed

Part 2.2: Poisson Blending

The goal for this part was to seamlessly blend a source image into some location within a target image using the method described in the toy problem above. The results are shown below. The second to last blended image is an example of a failure of the blending technique, and the cause for failure was due to the significant difference in background colors for the source and target images. That difference resulted in the original source image losing its natural color. The last picture in this collection is the same as the last one from part 1.4 but instead of using an irregular mask, I have used Poisson blending to make the combined image appear more natural.

Source Target Simple Addition Poisson Blend