The goal of this project was to implement the algorithm presented in the paper "Seam Carving for Content-Aware Image Resizing" by Shai Avidan and Ariel Shamir. The algorithm is used to resize images according to their contents. It specifies a "seam" – a path of pixels with least importance in terms of the content – and then removes or inserts that seam to reduce or extend image size. The challenge in the project was to implement an energy function (to find the importance of the seams according to the content of the image) that would generate the least visual artifacts.
Image Processing Techniques
The pixels to be added or to be removed (seam) were chosen according to an energy function applied to the image. Afterwards a cost table was constructed on the 'energy image' in order to find the pixels with least energy. (It's desirable for areas with less content/detail to have low energies.) By dynammic programming, a seam was constructed from this cost table and added/removed from the image. The performance of the seam carving algorithm depended higly on the energy function being used. THe functions that seemed to work best were:

1. Gradient energy computation

2. Edge detection with sobel filter

 

 

Images belong to: Nick Brandt - http://www.nickbrandt.com

Ando Hiroshige - http://www.hiroshige.org.uk/

Andreas Gursky