Assignemnt 3

Ben Swanson

Results

Assigned Images (without blending)

My images (without blending)

My images (with blending)

Explanation

In this assignment I implemented the Graphcut algorithm for finding mask boundaries. This algorithm's goal is, given a set of pixels which must be masked and a set which cannot be masked, find a mask whose boundary minimizes some function which captures the difference between the two images. By specifying one aforementioned set of nodes as sinks and the other as sources, this boundary can be found my the max flow/min cut algorithm where the edge weights are the function value.

The function I used, as suggested in the assignment, was the sum of squared difference between the source and target image, summed over both pixels the edge connects.

For extra credit, I integrated my possion blending code from the previous assignment. This combination of tools allows us to find a boundary with minimum artifacts, then remove these artifacts with blending.