Computational Photography 15862

Gradient-Domain Fusion

changshl (Clement)


Approach

Toy Problem

The goal of this problem was to set up a set of linear equations to retrieve the original image, by specifying only the gradients of a pixel and a single neighbour, along with a sample pixel from the source at (1,1). This set of linear equations was solved using the \ operator in MATLAB.

Poisson Blending

The goal of this problem was to blend 2 images, the source onto the target by minimizing their difference in gradients, as opposed to naive layering of the source onto the target. This is done by setting up a set of linear equations to compute a resultant image gradient that will minimize the difference of gradients of the boundaries between the source and target image. This gradient matching was done in the -x, +x, -y, +y axis. In order to make computations a whole lot faster, sparse() was used, and the algorithmic complexity was made to depend linearly on the size of area of interest in the source image.

Mixed Gradients Blending

The goal of this problem was to blend 2 images like poisson blending, but preserve the texture of the target image in the boundary. This can be seen in the mixed blending example. In order to achieve this, the gradient selected was the one with the larger magnitude between the source and target gradient, as opposed to just the source gradient.

Toy Problem Results

Toy Problem

source
result
Sum of squares difference = 1.0021e-29



Poisson Blending Results

Penguin

source
target
naive
poisson



Grumpycat and Hummingbird

source
target
naive
poisson



Pug and Cookie

Here we see that the resultant cookie lighter than the original cookie. This was an effect of trying to match the darker original cookie background with that of the lighter target area of the table. It overall produces quite a decent blend, albeit unrealistic lighting.
source
target
naive
poisson



Creepy baby

This image turned out creepier than intended. Similar to the first blend, it demonstrates that a good blend can be achieved if the target boundary area has the approximately the same color as background of the source image.
source
target
naive
poisson



Poisson Blending fail-cases

Pandadog and Hummingbird

The high frequency component of the grass edges gets lost in the boundary of the the blending. Although the boundary gradient minimizes the difference between that of the target and the source, it resulted in a blur.
source
target
naive
poisson



Horse and Hummingbird

Due to the huge difference in color in the area between that of the source boundary and target image, minimization of the difference in gradients led to a huge hue deviation from the original source image.
source
target
naive
poisson



Mixed Gradients Results

Boredom

source
target
naive
poisson
mixed

Bells and Whistles

This is easily computed using the mixed gradients of the S and V channel.

Color Blind?

source
result