William Choe Frank
CS194-26 Proj3
Fun with Frequencies and Gradients!
Part 1.1: Image Sharpening
In class, we learned that we can sharpen an image by taking the following steps.
First, create a lowpass filter of an image by taking a gaussian filter of the
original image. Then use that lowpass filter to create a highpass filter by
subtracting the lowpass from the original image. Finally, we can sharpen our
original photo by adding the highpass filter to our original image.
Mission Peak Selfie Unsharpened
Mission Peak Selfie Sharpened
Part 1.2: Hybrid Images
In class, we learned that we can create "hyrbrid" images by combining the
high frequencies of one image and low frequencies of another image. The
result is a hybrid image that looks like one of the original images from up close,
and the other original image from far away.
My Housemate Jacob
A Stock Photo of a Raccoon
Hybrid
Fourier Analysis
Jacob FFT
Raccoon FFT
Highpass FFT (of the racoon)
Lowpass FFT (of Jacob)
Hybrid FFT
Failure Hybrid
Me
A Mountain
Will + Mountain
Explaination: This probably failed because I tried fusing 2 things with very different shapes
(me and a mountain.) Also because I couldn't pick very good allignment points, and Doe Library
was mapped to the sky of the mountain which makes the high frequency building lines always ovveride the low frequency sky lines from the mountain.
Additional Hybrid
Tennis ball
Basketball
Fuzzy hybrid ball
Part 1.3: Gaussian and Laplacian Stacks
In this part, we created Gaussian and Laplacian Stacks of the famous Lincoln-Gala
photo. The Gaussian stack was achieved by repeatingly applying a Gasssian filter
with sigma 2^i at each iteration of the stack. The Laplacian stack was achieved by
taking the difference of consecutive Gassian filters in the Gaussian stack.
Gaussian Stack Lincoln Gala
Laplacian Stack Lincoln Gala
Gaussian Stack Jacob Raccoon
Laplacian Stack Jacob Racoon
Part 1.4: Multiresolution Blending
In this part, we used a mask and Laplacian Stacks to seamlessly blend 2
images together.
Apple + Orange = Orapple?
Image 1
Image 2
Blend
Additional Blend
Kakashi
Obito
Kakashi + Obito
Additional Blend with Irregular Mask
Grass
Checker Pattern
Irregular Mask
Grass + Checkers
Part 2.1: Gradient Domain Fushion - Toy Problem
In this part, and Part 2.2 we explore another way to seam blend an object into
a target image. Instead of using a Laplacian stack blending technique used
in Part 1.4, we will use a technique more focussed on gradients than image
intensity values which is called Poisson Blending which can be formulated as
a Least Squares problem.
For this part, we computed the x and y gradients of an input image, then
used those gradients and one pixel intensity value to reconstruct the input image.
Original Toy Image
Toy Image Reconstructed
Part 2.2: Gradient Domain Fushion - Poisson Blending
Favorite Blending
Source Image
Target Image
Naive Blend
Poisson Blending
Discission: This is the best result I got from this technique and compared to the
other blends this project explored, this is by far the best. I think what worked well here
was that the background for the source and target image were both deserts already,
so the algorithm worked even better given that.
Anotha One
Source Image
Target Image
Naive Blend
Poisson Blending
Failure Case
Source Image
Target Image
Naive Blend
Poisson Blending
Discussion: I think this failed because I tried blending to a white background. With the high level understanding
I have a gradients, this means that my source image would only get "lighter" and not drastically change its own gradient,
so even though this is better than the naive paste, because of the white background you can still see very easily
that this is not a good blend.
Poisson vs. Multi Res.
Poisson
Multi. Res.
Discussion: If I had to pick a better blend, I would give it to Poissson, but not by much.
I think these 2 methods both have trouble dealing with 3D images that represent 2D objects.
Although in most other situations, like the obi wan and desert, Poisson is so much more versitle in its blends
so I would personally choose Poisson other Multiresolution blending.