Computational Photography: Project 3
Alyssa Gerharter, Fall 2012


Description
This assignment uses dynamic programming to implement content aware resizing of images, aka seam carving. The goal is to create images smaller than the original while containing all the same information.

Technique
The algorithm incrementally removes the least "important" seam from the image. It does this by first calculating the gradient of the grayscale version of the image, which is used as an energy function. Then dynamic programming is used to calculate the optimum seam to remove, or the seam with the lowest energy. This seam is then removed from the image. This continues until the desired number of pixels have been removed.

Results
Resized horizontally 100 pixels.

Resized vertically 100 pixels.

Resized horizontally 150 pixels.

Resized horizontally 150 pixels.

Resized vertically 50 pixels.

Resized horizontally 100 pixels.

Resized horizontally 150 pixels.

Resized horizontally 250 pixels.

Failure Case
I'm unsure why this removed seams inside the elephant rather than from the background on the sides or in between the elephants. The only reason I can think of is that the elephant's trunk creates a vertical line of very uniform color, so those seams were chosen over the grassy background. This was resized horizontally 50 pixels.