16-726 21spring Assignment #2

Gradient Domain Fusion

Author: Zhe Huang (zhehuang)


1. Introduction

In this assignment, we explored a gradient-domain processing image blending technique called poisson blending. By minimizing the difference in gradients, we can blend two images together with minimal style discrepancies.

Specifically, we define the image containing interesting objects that we want to put on top of the other image as foreground image, whereas the other image providing the background as background image. Poisson blending is to find a new blended image where each pixel from that image is from the least-square approximation of a solution of a linear system that minimizes the gradient difference between foreground image and the blended image in foreground area and minimizes the gradient difference between background image and the blended image in background area of blended image.

2. Toy Problem

In this part, we show the result corresponding to Part 1.1 in the assignment by properly implementing the three constraints stated in the Part 1.1 description. Our output image is basically the same as the imput (with the R1 loss to be less than 0.006), which indicates the correctness of my implementation.

2. Poisson Blending

In this part, we show the result corresponding to Part 1.2 in the assignment by properly implementing the original Poisson Blending algorithm stated in the Part 1.2 and Background part of the project. The interface for plotting the graph is as follows.

2.1 Good Results

Here are two good results of what we get from the Poisson blending.

2.2 Bad Results

Here is some not very successful demostration of Poisson Blending. I was meant to merge this grin face and the doge face together but what I got is just the grin face on top of the doge with a different color vairation. The reason why it failed is probably due to that this problem is not suitable for Poisson Blending technique. While Poisson Blending is succesful at blending an object of interest into its surrounding background of a target image, it cannot naturally blend two object together by solving a simple least-square system.

3 Bells & Whistles: Mixed Gradients

In this part, we show the effectiveness of using mixed gradients in Poisson Blending. We show the comparison between the original Poisson Blending and the Poisson Blending with mixed gradients, which has a great improvement to seamlessly blend the foreground and background together.

3.1 Original Poisson Blending

In this case, you can clearly see the artifact around the sigma letter in the final blending, which resembles some kind of Gaussian blur.

3.2 Mixed Gradient Poisson Blending

In this case, you can clearly see the improvement from the origianl Poisson Blending, where in the final product, the sigma letter is seamlessly blended into the bricks, without blurry artifacts.