Seam Carving is an algorithm for content-aware image resizing.
It functions by establishing a number of seams (paths of least importance) in an image and automatically removes seams to reduce image size or inserts seams to extend it. Seam carving also allows manually defining areas in which pixels may not be modified, and features the ability to remove whole objects from photographs.
Original | Scaling | Croping | Seam Carving |
---|---|---|---|
Computing a seam consists of finding a path of minimum energy cost from one end of the image to another.
To do this we use Dynamic Programming.