Blending

Project 3     |     Eric Zhang (agq)

Overview

In this project, we explore several methods of blending images together. These methods include pyramid blending and gradient (Poisson) blending.

Warmup: Unsharp Filter

Original (Blurry)
Sharpened

The original photo was taken with lens blur, which makes it not possible to fully reconstruct a sharp image. However, the unsharp filter can emphasize high-frequency details to make it appear sharper.

Hybrid Images

The idea behind hybrid images is to blend two images using frequencies. The low-frequency data of one image added to the high frequency data of another image to obtain the final blended image. This works on the principal that high frequency data (fine details) are more noticeable at close distance or when the image is scaled up. However, from far away (or when scaled down), only the low frequency data is picked up. The result is an image that looks like one thing close up and another thing when viewed from afar.

Original Images

Derek
Nutmeg

Blended Images

Up Close
Zoom Out

A litle background information about the next set of images. The first image is a still taken out of the 2017 live action version of Disney's Beauty and the Beast. The second image is a photo of Dan Stevens, who plays this role in the movie. Whether in general it's beast supressing the human within or the human surpressing the beast within is food for thought.

This particular blend worked especially well since the faces were more or less oriented with similar perspective, with the only tranformations necessary to be euclidian. In addition, since the face of the beast was based off the real actor's face (with image manipulation applied in post production), the structure was similar enough to get a decent blend.

Original Images

Beast
Dan

Blended Images

Up Close
Zoom Out

Let's take a look at the Fourier image of both original images and the final image.

Original Fourier Images

Beast Fourier Image
Dan Fourier Image

Blended Fourier Image

The middle of the blended fourier image retains the diagonal feature of the original image. However, the outer regions of the blended image do not have the clear features of the original fourier image. This is due to the fact that the "Beast" image underwent a low-pass filter, which cut out most of the outer regions of the fourier image.

Original Images

Cat
Dog

Blended Images

Up Close
Zoom Out

These two images did not blend together very well for several reasons. First, they're totally different animals (pun intended). The perspective was slightly different (due to the head's tilt). In the final image, one can see the cat's nose does not line up well with the dog's nose. This is also due to the fact that a dog's facial structure is substantially different. In addition, this breed of dog has droopy ears while the cat's ears stand straight. The part that does look interesting is the eyes, which look very strange from closeup on the blended image but much more natural from afar.

Pyramid Blending

The idea behind pyramid blending is to blend differet frequency bands with a different window so the seam appears smooth. Frequency bands are obtained by creating a Laplacian stack and blending the same level of the stack for both images together. In the end, the blended laplacian stack is summed together to reconstruct the original image.

Original Images

Apple
Orange

Blended Image

Oraple

Original Images

Grassland
Desert

Blended Image

Dreamland

Poisson Blending

Since human perception pays most attention to change in the image, it is best to ensure that all changes in image blending are smooth. Poisson blending attempt to acheive this mathematically by minimizing the difference between the gradients (difference between adjacent pixels) of the background image, and the source image that we are copying pixels from.

Original Images

Hikers
Penguin

Composited

Original Images

Scooter
Table

Composited

Mini Scooter

This image did especially poorly. It is probably due to the fact that the masked scooter image is relatively sparse (there's not much "body" it and there are many holes).

Original Images

Computer Mouse
Airport Runway

Composited

Blended
Not Blended

One interesting thing to note about the last set of images is that the overall color temperature of the two images differ drastically. The picture of the mouse is relatively yellow whereas the picture of the airport has more of a blue tint. The algorithm, which attempts to compensate for this and only apply the differences of the mouse relative to its surroundings, applies those same differences to the airport picture. Since the surroundings of the aiport picture are relatively blue, the mouse becomes blue.