16726 - Learning Based Image Synthesis - Spring 2020

harsh sharma (Andrew ID: hsharma2)

Homework 2 - Blending images using Gradient Domain Fusion

About this Assignment

The goal of this assignment is to fuse images together using gradient domain processing. Humans are more trained to focus on change in the pixel values rather than the pixel values themselves. Therefore matching gradients becomes a key task for reconstruction or blending images. Firstly we explore reconstruction of an image using just the gradients and then solving a least squares linear system to get back the original image. The overly constrained system tries to solve for the image pixels so as to match the original x and y gradients of the image and a single pixel of the original image.

Next we blend two images using poisson blending. Here again we compute the gradients to map the source image onto the target image by solving an overconstrained system in the least squares sense. The gradients of the target image are matched with the source image within the source image area.

Where,
s - source image
t - target image
v - new intensity values
S - source region
i - a pixel in the source region ā€œSā€,
j - each j is a 4 neighbor of ā€œiā€ (up-down-left-right)

Each summation ensures that the gradient values match those of the source region. In the first summation, the gradient is over two variable pixels; in the second, one pixel is variable and one is in the fixed target region.

Toy Problem

Reconstruction of a single channel image

Poisson Blending

Target image

Source Image and Mask

Naive and Poisson Blend image

CSS Styling and base template based on StackEdit.