Project 3: Graphcut Images

Diana Huang (dkh) - February 17, 2010

Description

For this assignment, we used the min-cut/max-flow algorithm to find the optimal mask between two images. By getting a good calculation of the distance between a pixel and its neighbor, we can then find the optimal cut in the graph represented by the pixels and the distances between each other. The implementation of the algorithm is the slow, naive kind, without any optimizations.

Extra Credit

I did not implement any extra credit.

Results Images

Provided Images

These images turned out reasonably well. The results are frequently dependent on the quality of the masks selected. There are times when the cut will cut out interesting details, especially when they are not place in the correct locations.

My Own Images

Image One

For this one, I used the image of a geese on grass in order to try to match the grass of the background I was using. There were issues with this, especially since the colors are very different, which makes the cut harder to find.

Source:

Target:

Result:

Image Two

For this image, I reused images from Poisson blending to see if I could get a better mask, since the texture behind the gnome somewhat matches the texture of the grass behind him. However, the cut may have taken too much and then covered up part of one of the sheep.

Source:

Target:

Result:

Image Three

For this image, I tried really hard to make sure that the textures and colors of the background images lines up correctly, and as a result, the final product turned out fairly well. The horizons don't match, which definitely draws the eye.

Source:

Target:

Result:

Image Four

Once again, I tried to reuse older images to see if they did better with this graphcut algorithm, especially with the more textured foreground images. In this case, it took a lot more than expected, by including a lot of the heads at his feet and the colors of the background behind his head.

Source:

Target:

Result:

Image Five

Yet another one of the images I reused to see if it worked better with the graphcut algorithm. The cut here is a lot larger than the desired mask, probably due to the texture of the target surface. The algorithm also seems to have lopped off part of her foot.

Source:

Target:

Result: