Project 3 - Albert Phone

1.1 - Sharpen

I sharpened a blurry photo my friends took on my phone. I did this by taking the image and subtracting it with a Guassian filter and then adding it back to the original image.

blurry friends

1.2 - Hybrid

I hybridized these photos below. To do so, I aligned the images and then took a high pass and low pass filter and average the two two produce the final image.

Favorite Image

steve sally hybrid

FFT

fft

Other Image

pooh piglet hybrid

Failure Image - Our choices of images don't fit well because they don't align well for this hybrid image.

me frog hybrid

1.3 - Gaussian and Laplacian Stacks

I made the Gaussian and Laplacian stacks for the images below. To do so, I used the recommended 5 stacks and at each level, ran a guassian filter on the image. To find the laplacian, I kept track of the previous gaussian fitler layer and subtracted it with my current guassian filter.

Licoln Image

licoln licoln licoln licoln licoln licoln licoln licoln licoln licoln

Hybrid Image

licoln licoln licoln licoln licoln

1.4 - Multiresolution Blending

I blended the images below. To do so, I created a mask and then ran a gaussian filter over it to help create a smooth transition between the edges of the masks. I then created a laplacian stack for both images and then at each level, I multiplied that image with their respective masks and then added it together to create the blended layer. Adding all of the blended layers together produced our blended image.

Oraple

apple blend orange

MountainSea

sea blend mountain

Laplacian for MountainSea

sea sea sea sea sea sea sea sea sea sea

Building with Irregular Mask - Our mask doesn't work well with this particular blend, creating a weird almost hybrid looking picture instead.

bigben blend eiffel

2.1 - Toy Problem

For part 2.1 we are essentially taking an image and reconstructing it using what is called gradient domain processing. In order to do so, we essentially create a matrix of linear equations, A, and use a solution vector, b, in order to create a system Ax = b that we can solve. The A matrix is made up of every single pixel of our image and details which represents the x and y gradients for each pixel with the pixel that is directly adjacent to it. The b solution matrix is the actual gradient between every two points matching each row that the A matrix represents. After doing so, we are able to use a sparce matrix solver with the solution vector to find our x matrix, which is essentially going to be our original image.

Toy Story

toy

2.2 - Poisson Blend

Favorite

up ocean blend

The process works by again solving a system of equations that is created by an A matrix and a b solution vector. The b solution vector is made up of values from either the target matrix if we that particular pixel isn't in our mask, and made up of values from the source gradient created by surrounding points to a particular pixel. Then for each RGB layer, we just solve for it and add it to the final output image. We basically pool from a Poisson gradient if we are inside our mask and from the target if outside our mask.

Other Image

up ocean blend

Failure Example

up ocean blend

This is most likely because the the R&M picture has a white boundary and to make my mask, I only take the top left and bottom right point and create a rectangular mask. If I can make a more circular mask and only grab the green portal like part, the blend would probably fit better into the grass. Also, the pictures become more difficult to blend the more the background color differes which is obviously evident in the comparison of skin (the eye and belly) to the portal and grass backgrounds.

Big Ben and Eiffel Revisited

up ocean blend

Clearly, this mask works better in creating the Big Eiffel tower. This is because the pyramid method attempts to stich vertical seams between the two pictures which doesn't work because what we want is a mask that surrounds Big Ben instead of a mask that seams the photos together. That being said, we would want to use the Laplacian stacks to blend an image when we have simple halves that we want to merge, like the Oraple or the Mountain Sea. When we want to blend an image with a more precise type of mask, we want to use the Gaussian to be able to cut out exactly a portion of an image and blend it with a specific background.