CS 194-26: Image Manipulation and Computational Photography

Project 3: Fun with Frequencies and Gradients!

Daniel Shi - abl

Part 1

1.1 Warmup

Rubix cube before and after sharpening

1.2 Hybrid

Keming Kao (highpass) and Danny Devito (lowpass)

Dali painting (highpass) and Danny Devito (lowpass)

Fourier analysis of Dali-Devito hybrid image

Dali


Devito


Dali highpass


Danny Devito lowpass


Hybrid image



Failure Image

Nanxi Wang (highpass) and Daniel Shi (lowpass). Hybrid image failed as highpass is too in focus while lowpass is virtually nonexistent (chose bad sigma values).

1.3 Gaussian and Laplacian Stacks


Lincoln and Gala

Lincoln and Gala and Danny Devito hybrid image

1.4 Multiresolution Blending

Apple orange blend along the vertical axis

Derek and orange. Irregular mask used to blend a face with an apple

Derek's eyes blending with Nutmeg

Derek and Nutmeg blended along the vertical axis

Part 2

Our goal is to seamlessly blend an image from one source file to a target file. To accomplish this, we want to match the gradients of the source image with the gradients of the target file as best as we can. In order to do this, we can model the problem as a least-squares equation and solve for our desired pixel intensities.

2.1 Toy Problem

Toy problem



2.2 Poisson Blend

Nirby!

Nanxi Wang and Keming Kao. I was unable to remove the glasses, so the final result is a little bizzare

Favorite Image

Keming Kao Source


Keming Kao Target


No Poisson


Poisson Blending. For the previous image with no poisson blending, I simply compied over the source mask into the target image. With poisson blending, we solve for the poisson mask to be as close to possible to the gradient inside the source mask and the gradient of the boundary of the source mask with the target image. Doing so will result in an image that blends in better with the surrounding environment.

Failure Image

I tried to blend Derek's eyes and nutmeg with poisson but I don't think my mask had enough of a border around the eyes, resulting in the eyes blurring over. In general, it seems I need a healthy amount of border of the source mask in order to get a decent blend.

Multiresolution blending vs Poisson blending

The two original images I plan on blending together

Multiresolution blending

With multiresolution blending, I took the mask over the entire face. Unfortunately, this resulted in an outline of the face still being slightly visible as well as distorting the entire image. The colors of the face also appear very washed out.

Poisson blending

With poisson blending, I was able to create more accurate masks, allowing me to create a better overall image. Because of the redness of the apple, the lips of the face became darker and the outline of the eyes became sharper and more distinct. I also did not have to distort the image to get the face and the applie to align correctly. As such, I believe the poisson blend turned out much better than that of the multiresolution blend. However, in situations where the source mask is not great or where the boundary colors don't match, multiresolution blend is probably a better choice than poisson blend.