Project 3 - Fun with Frequencies

By Anthony Sutardja

This project tinkers with images in the frequency domain. I use the approximations of the Laplacian of a Gaussian and Gaussian filters to filter the images.

Sharpening

In order to sharpen images, I used the technique described in class: increasing sharpness by adding a multiple (here described as alpha) of the "detail portion" of the image, which is the original image subtracted from a gaussian filtered version of the image.

Original image Sharpen with alpha @ 0.3

Sharpen with alpha @ 0.5 Sharpen with alpha @ 0.9

(Top left: original image; Top right: sharpen with alpha @ 0.3; Bottom left: sharpen with alpha @ 0.5; Bottom right: sharpen with alpha @ 0.9)

Hybrid Images

The hybrid images are a composite of two images: one image is modified with a low-pass filter (Gaussian) and the other is modified with a high-pass filter (Laplacian of a Gaussian). I used a box appproximation of both of these filters.

Jesus Colbert

Jesus Colbert

The frequency plots of both the original Jesus and Colbert images are shown below.

Jesus Colbert

I applied the low-pass Gaussian filter to the Jesus image, and the high-pass Laplacian of the Gaussian filter to the Colbert image. I chose to approximate cutoff frequencies with $$$f_c = \sigma_c = \frac{1}{2 \pi \sigma}$$$.

Jesus Colbert

From the frequency plots of the filtered images below, we can see that the low-pass and high-pass filters worked on each image.

Jesus Colbert

The hybrid image is then combined together with different weightings. My best result is presented below. From up close, you can see the sharp outlines of Stephen Colbert, but from far away you can only see Jesus.

Colbert Jesus

Other hybrid images didn't work out as well as the Colbert Jesus hybrid. Colbert Jesus worked out so well because the silhouettes of the two different images align very well. The other images didn't work out as well because they were just so vastly different from each other.

Surfer meets Cal logo

Surfer Cal logo Cal surf

Cat Person

Cat Person Cat person

Tony Wu meets Panda

Tony Panda Panda

Gaussian & Laplacian Stacks

Salvador Dali's Lincoln Painting

Lincoln Stacks

Colbert Jesus

The Gaussian and Laplacian stacks for my favorite image clearly distinguishes the separate images of Stephen Colbert and Jesus.

Stacks of Colbert Jesus

Multiresolution Blending (Spline)

My implementation of multiresolution blending uses Laplacian and Gaussian stacks (rather than pyramids).

Space Desert

Earth Road

Both images are processsed into a 5 level Laplacian stack, with each level using a larger and larger sigma. The sigma corresponds to the Gaussian that is used to approximate the Laplician (recall that I approximate the Laplacian by subtracting the Gaussian filtered image from the original image).

The next step is to create a Gaussian stack of the image mask.

Image mask

A laplacian stack of the splined image is then composited based on the weighting from the filtered image mask for each level in the stack:

$$LN(i, j, d) = mask(i, j, d) * LA(i,j,d) + (1 -mask(i, j,d)) * LB(i,j,d)$$

where $$$LN$$$ is the new Laplacian stack, $$$LA$$$ and $$$LB$$$ are the Laplacian stacks of the images that we want to blend, and $$$d$$$ is the level of the stack.

The result is a blended image:

Joined photo

Joined photo

Orange Apple

Orange Apple Orange

Bird Collage

Hummingbird Little birds Birds joined

Bells and whistles

Color multiresolution blending

See the multiresion blending images to see the results.

Reflective padding on for Gaussians

While creating the Gaussian stacks (which is used by the Laplacian stacks), I padded the images with a reflected portion of the image. The program then automatically crops the images down to the original size.

References

Picture sources

Paper sources