Assignment 2 - Poisson Blending

Ben Swanson

For this project, I implemented Poisson Blending as described in Poisson Image Editing (Perez et al). The algorithm uses a boundary area dU which are the pixels which are at indices in the mask which are not under the mask but have at least one neighbor whose values are under the mask, and a region U, the pixels under the mask. The algorithm works on each color channel independantly, and then the three color channels are composed to form the final image.

Using the bear / swimming pool image as an example, in the following discussion the source image is the bear and the target is the swimming pool.

For every pixel p in U, p's intesity is constrained to be the average of its neighbors plus the average gradient at p in the source image. The gradient is computed by summing the differences in pixel intensity in the source image between p and its neighbors. The average of intensities uses the target image for neighbors in dU and uses the values we are solving for on every pixel in U. This leads to a system of equations with variables for every pixel in U, and can be solved by a matrix inversion and multiplication.

Provided Examples


Transparency

Perez et al describe a further alteration of this algorithm to handle images with holes and transparency. The idea is to preserve in the output image whatever gradient information is stronger, in the source image or the target image. The upshot of this is that if we are blending an area of the source which is uniform but the target which is presumably underneath it is nonuniform then the target will influence the guidance field and push the pixel value we are solving for in the direction that the target image suggests. The effects are clearest in the plane and rainbow images, but the mona lisa image clearly demonstrates that this sort of behavior is not always desirable.

Provided Examples with Transparency


CS Dept faceblending

Ericah Suddner

Eugesse Butterniak