# Seam Carving code - October 2013

ProgrammerProject for 15-463 Computational Photography at Carnegie Mellon University, Fall 2013.

This project crops images using seam carving, detailed in this paper.

I implemented seam carving using a basic dynamic programming approach. Given an energy function, the program looks at each pixel starting at the top, selects the pixel with the lowest total energy from the above three pixels and stores the sum of the total energy and the current energy value at the pixel's location. The seams are determined by starting at the bottom and finding the pixel with the lowest total energy and tracing the path to that pixel back up to the top. The energy function I used was the gradient magnitude, calculated with MATLAB's imgradient function.