Project 2

Jiaheng Hu (jiahengh)

Overview

In this project, we explored gradient-domain processing, a simple technique with a broad set of applications including blending, tone-mapping, and non-photorealistic rendering. We seamlessly blend an object or texture from a source image into a target image by exploiting the fact that people often care much more about the gradient of an image than the overall intensity. and set up the problem as finding values for the target pixels that maximally preserve the gradient of the source region without changing any of the background pixels. We thus formulate our objective as a least squares problem, and cast the problem of image blending into an optimization problem which we then solve through existing libraries.

1.1 Toy Problem

We first show the result of the toy example of reconstructing an image through gradient:


1.2 Poisson Blending

We run poisson blending for a few different pictures. We first show it on the given example, then on three other examples that we found.

Given example 1:


Source:

Target:

Direct Blend vs Poisson Blend

My own example 1:


Source:

Target:

Direct Blend vs Poisson Blend

A flying Penguin lolllll

My own example 2:


Source:

Target:

Direct Blend vs Poisson Blend

My own example 3 (failure case):


Source:

Target:

Direct Blend vs Poisson Blend

Well, this is not exactly a failure case, but it definitely exposes some weakness of this algorithm: we can see that the region around the aircraft tends to get pretty blury. This is because we have no access to the gradient information of this area in the background image. Thus, the best the algorithm can do is to make it a blurry approximation of the background image's border.

Bells and Whistles

For Bells and whistles I implemented mixed gradient, in an effort to alleviate the problem mentioned above. We run this updated version on the same example, and present the result below:



We can see that comparing to previous poisson blending, this version is able to capture the lake and mountains in the background a lot better, thus making the image more realistic.