Project 3 Writeup

Tim St. Clair (tstclair)
February 26, 2010

Description

My implementation of the graph cut algorithm is fairly basic. I used the same distance metric recommend on the project page, with the addition that I summed the error over all 3 color channels. I tried doing separate cuts for the different color chanels, but the results were very bizzar looking, due to larger color differences. Given more time I would like to try this in a different color space, such as HSV. To compute the edge weights, I took the difference of the source and target image, and then filtered this with filters such as [1 1 0] to sum the errors for different neighbors (top, bottom, left, right). In my results, I can see what the algorithm is doing, and it works in some cases, but it could definitely benefit from some additional blending or a boundary favoring edge weight, since the problems often arise along background discontinuities. In my results bellow I have included an naive result for comparison, which is constructed by taking the source and target image under their respective masks, and the average of the two outside the masks.

Results Images

Discussion Naive Composition Graph Cut
This is a case where a boundary favoring edge weight scheme would be greatly beneficial. The algorithm favored some edges, such as the mountain line above the plane, but an algorithm that made more of an effort to cut along the plane's boundary would greatly improve this result.
This is another case where the algorithm does not perform particularly well and would greatly benefit from an edge favoring weight scheme or blending
The algorithm performs very well in this case. My hypothesis as for why is that both the forground and background images are very highly textured, which gives the algorithm alot more freedom to hide discontinuities in the iages.
Here is another case where the algorithm performs pretty well. As with the above image, this is probably due to the texture of the water, as well as the similarity in the colors. However, some blending along the seem would improve the result.

My Images

Discussion Naive Composition Graph Cut
This image works pretty well, especially bellow the bear. Above the bear the image is blurred (because the background in the bear image is blurred). I don't think blending would make a big difference in this case, but an edge favoring weighting might help.
Here is a case where the algorithm does not do particularly well. Blending would greatly help this example, most likely because there is not a lot of texture in the target image in which to hide the discontinuities.
This is another example of how the algorithm benefits from highly textured images. The algorithm is able to hide the seem well along the treeline, but where sky meets sky the only way to hide the color difference would be with a blending technique.2