Computational Photography

Seam Carving
Due Date: 11:59pm on Monday, October 1st, 2012
Corina Gurau

Introduction

Content-aware resizing of an image refers to changing the aspect ratio and size of an image with minimal distortion of the main features of the image. It was first proposed by Shai Avidan and Ariel Shamir in Seam Carving for Content-Aware Image Resizing. In this assignment, we implemented the basic algorithm presented in the paper.

Seam Carving results

A seam is an optimal path of pixels on a single image from top to bottom, or left to right, where optimality is defined by an image energy function. I computed the energy of an image by transforming it to grayscale and using the function gradient() in Matlab. With dynamic programming, I calculated the seams with minimal energy and I removed them until reaching the number of rows/columns wanted. Here are some results of my algorithm:




Failure example. Seam carving might not preserve strainght lines, and in this case the structure of the building is destroyed.
Source: Personal pictures (the above 3)


Source: http://www.facebook.com (the above 2)

Source: http://www.tourist-destinations.com/2011/05/paris.html