Part 1: Frequency Domain

Part 1.1: Warmup

In this part of the project, we use the unsharp masking technique to “sharpen” an image.

Results

The following images come from from a scene in “The Sad Story of Henry” (Thomas & Friends s01e03). This scene depicts workers erecting a brick wall in front of Henry under the orders of the Fat Controller, due to Henry’s refusal to leave the tunnel.

(Source code, jpg)

../_images/part1-1.jpg

We can see that applying the unsharp mask filter helps to accentuate the emotions on Henry’s face as he watches the workers build the wall right in front of him. In addition, this filter also enhances the textures on the bricks that make up the tunnel.

One interesting thing to note is that if we increase the weights too much, the pixel values will end up getting clipped, resulting in a mildly disturbing image. Imagine if the actual show were like this.

(Source code, jpg)

../_images/part1-2.jpg

Part 1.2: Hybrid Images

In this part of the project, we blend together two images to create a hybrid image that looks different depending on the distance that the viewer is from the image. This effect is accomplished by combining a high-pass filtered image with a low-pass filtered one. The result is that the high-pass image is visible from a close distance, while the low-pass filtered image is visible from far away. This is because our eyes are not very perceptive to small, high frequency details when viewing an image from far away.

In order for this effect to work, the images need to be aligned before merging.

Results

We show three different hybrid images. The first one combines a cat and a dog. The second image combines Taylor Swift (singer) and Brook Taylor (Mr. Taylor Series). The third image combines a cow and a rabbit and was a mild failure.

(Source code)

../_images/part1-3_00.jpg

(jpg)

../_images/part1-3_01.jpg

(jpg)

../_images/part1-3_02.jpg

(jpg)

The rabbit/cow hybrid is an example of a failure case where the results are not particularly great. This is likely due to the fact that the hybrid uses the high frequency components of the rabbit, but the rabbit’s body is fairly smooth, so it is hard to see the rabbit. Instead, probably the most prominent feature from the rabbit component of the image are those blades of grass, which make it look like the cow is being impaled by some horrific device.

Fourier Analysis

We can do Fourier analysis on the hybrid image to visualize things in the frequency domain. In particular, we can observe the effects of the high and low pass filters on the two Taylors.

(Source code, jpg)

../_images/part1-4.jpg

Part 1.3: Gaussian and Laplacian Stacks

In this part of the project, we construct Gaussian and Laplacian stacks for images to discover their frequency content. The elements of the Laplacian stack are band-pass filtered versions of the original image.

Results

Salvador Dali Painting

Looking at the stacks for this painting, we can see how the first element of the Laplacian stack clearly shows the lady, while the later elements show Lincoln. This explains why one would see the lady when looking at the painting from close distance, but see Lincoln when looking from further away.

(Source code, jpg)

../_images/part1-5.jpg

Cat/Dog Hybrid Image

Looking at the stacks for the cat/dog hybrid image we produced in the previous part, we can separate the cat from the dog.

(Source code, jpg)

../_images/part1-6.jpg

Part 1.4: Multiresolution Blending

For this part of the project, the goal is to apply the multiresolution blending technique to blend two images together. The idea behind this technique is that larger (low frequency) features should be blended together with a larger window, while smaller (high frequency) features should be blended together with a smaller window. To separate out the frequency components of the image, we can construct a Laplacian stack from each image. To get different masks for the blending window, we can construct a Gaussian stack from the binary mask.

Results

The following images compare the result of a naive combination to multiresolution blending.

Apple and Orange

Everyone has this example, since these images were provided in the project spec. How boring.

(Source code, jpg)

../_images/part1-7.jpg

Jupiter and Latte

In this example, we use an irregular mask to put Jupiter inside of a latte. This is probably better than putting Uranus inside a latte.

(Source code, jpg)

../_images/part1-8.jpg

Banana and Cucumber

Is it a fruit or a vegetable? What would this even taste like? From what end would one start eating? Does one need to peel thing thing before eating? Who knows.

(Source code, jpg)

../_images/part1-9.jpg

Let’s plot the pyramids for this example:

(Source code, jpg)

../_images/part1-10.jpg

The Laplacian pyramid helps us to see how each frequency band has been blended together.