Seam Carving is a novel technique for doing content-aware image resizing aka “image retargeting”. The idea is to remove seams of low-energy pixels one at a time until the image is truncated to the desired dimensions. In the papers cited below we are introduced to the concept and its applications.
We present an implementation of the Seam Carving technique in pure JavaScript running in the browser. The implementation of the algorithm is summarized:
In the results below we see that a typical scaling operation will uniformly flatten scene objects, while retargeting keeps the size of certain elements intact.
Original