Project 3: Graph Cut Images

Jarrell Travis Webb (jtwebb)
Feb. 26, 2010

Introduction

This project takes two images and two masks and produces a composite. The composite is produced with a graph cut where the pixels are nodes in a graph each linked to neighbors with edge weights based on the difference between the two images. The masks are treated as source and sink. The idea is to use the masks to specify portions of each image that will appear in the final image. Outside of those control regions the alogrithm will try to find the seams where the difference between the two images is at a minimum that way the transition from the source to sink will be as seamless as possible. The exact edge weight between nodes (neighboring pixels) is the sum of the squared difference between the pixel values of the two images and the squared difference between the neighboring pixel values of the two images. Edges to the source and sink are weighted at infinity.

Results Discussion

This needs to be used in tandem with some sort of blending or color balancing technique. The algorithm may find the best seam but if the images have similar patterns but widley different colors and that breaks this horrbily. The only thing that works well is water because we are used a wide variety of choppy whites and blues.

Result Images

Multichannel Results

I also tried producing a separate mask for each color channel. In some cases this probably improved the blending in a minor way. In other cases one or more color channels exploded because there was no good match on that channel so they graphcut went all the way to the border of the image.

Multichannel Result Images