Seam carving is a content-aware image resizing technique created in 2007 that allows images to be reduced in size by one pixel at a time while preserving important features. It works by calculating the lowest "energy" path or seam through the image and removing it, where energy is defined by a dual-gradient function measuring color and texture differences. The algorithm uses Dijkstra's shortest path method to find seams for resizing and can also be used to remove objects or enlarge images, making it a useful tool available in applications like Photoshop and GIMP.
6. Seam Carving
? Content-aware image resizing technique created in 2007
? Also known as ¡°liquid rescaling¡±
? Available in graphic applications (Adobe Photoshop, GIMP, ¡)
? Image is reduced in size by one pixel of height (or width) at a time
? The most interesting features of the image are preserved
#4: Standard image scaling is not sufficient since it is oblivious to the image content and typically can be applied only uniformly
#5: Cropping is limited since it can only remove pixels from the image periphery
#6: More effective resizing can only be achieved by considering the image content and not only geometric constraints.
can change the size of an image by gracefully carving-out or inserting pixels in different parts of the image. Seam carving uses an energy function defining the importance of pixels. A seam is a connected path of low energy pixels crossing the image from top to bottom, or from left to right. By successively removing or inserting seams we can reduce, as well as enlarge, the size of an image in both directions
#12: Seam carving can support several types of energy functions such as gradient magnitude, entropy, visual saliency, eye-gaze movement, and more.
No single energy function performs well across all images but in general they all accommodate a similar range for resizing. They vary in the rate at which they introduce visual artifacts and the parts of the image they affect
#13: areas of an image with very little variation in colour have less detail and so are better candidates for removal when resizing.
#15: The optimal seam can be found using dynamic programming. The first step is to traverse the image from the second row to the last row and compute the cumulative minimum energy M for all possible connected seams for each entry (i, j):
#17: images that are too condensed (left) (in the sense that it does not contain ¡®less important¡¯ areas) or where the content layout prevents seams to bypass important parts (right). In such cases the best strategy would be to use scaling