Technology

Ariel Shamir and Shai Avidan have presented the coolest digital image effect I have ever seen. “Seam carving” allows an image to be resized non-uniformly, so you can change the height to width ratio in the image without cropping, but also without distorting important features in the image (such as faces).

If I understood the demonstration correctly, the algorithm detects horizontal and vertical paths which span the whole image and have the least gradient magnitude along the span. When resizing an image, the pixels along these seams are stretched or removed, leaving the rest of the image untouched. Areas of an image that absolutely need to be preserved can be manually excluded, and the seam generating function will negotiate paths around those pixels.

You need to watch the video to really see this in action, but the technique can also be used to remove whole portions of an image without perceptible artifacts. Essentially, you could cut an Ex out of your old vacation photos and the rest of the image would distort itself, unnoticeably, to fill in the gap.

Seam Carving for Content-Aware Image Resizing – [via] Video: Link PDF: Link
High-res copy of the above video @ Dr. Ariel Shamir’s site – Link

18 thoughts on “Seam carving: content-aware image resizing

  1. That’s really sweet. Its applicability to application development, the designer-developer work flow, and design in general is mind-boggling.

    If anyone successfully downloaded the PDF, could you post it somewhere. Looks like Dr. Shamir’s web server is getting pounded.

  2. Agreed it’s a neat effect and effortlessly accomplishedWhat I think is scary about it isn’t the ease of removing people or the likes – that’s easily accomplished (though not so fluidly) with photoshop et al. – it’s the distortion of any concept of composition which the original image had. See Nat Geo pyramids fiascoCreators of imagery spend their lives working with compositions and mastering their techniquess and now we’re going to squash and munge their images just to fit the ‘important parts’ on an iPhone?? Pssssssesh.

  3. For those interested, I have implemented a parts of the algorithm from the paper in C++. You can download the software (currently windows only) from my site.

  4. Check out rsizr.com for a Flash-based implementation of seam carving that lets you resize images, both in height and width simultaneously, in real time.

Comments are closed.

Tagged