Open Source Seam Carving

seamcarving_20070918.jpg

For those of you who didn’t catch our previous post about seam carving, it’s a smart image resizing algorithm, invented by Dr. Ariel Shamir and Dr. Shai Avidan. Where you would normally have to choose between cropping or squeezing/stretching an image to change its aspect ratio, the seam carving method will attempt to find horizontal or vertical paths within the image that can be removed without altering “important” parts of the image, such as people or other objects that would look funny if squished.

There are now a couple of open source Actionscript implementations as well as a GIMP plugin that enable you to “liquid rescale” your photos.

I’m thinking that with a few simple tweaks, you could hack one of the Flash versions load a user-specified JPG or PNG and provide an interface for adjusting the image. It’d just be a simple matter of doing a screen capture to pull the result back into the image editor of your choice.

There’s also a Photoshop plugin that claims to do this, but it’s closed source, unavailable for macs, and the test version doesn’t work for images larger than 640×480. To that I say, “Phtfphpht,” but I’ve included a link in case you are interested. To be fair, it’s probably cool… I’m just more excited to see the open source versions surfacing.

References:
GIMP Liquid Rescale (lqr) plugin – Link
Content-aware image resizing in Actionscript (Joa Ebert’s original source) – Link
Seam carving in Actionscript (Mario Klingemann’s optimizations) – Link
Pictual: Photoshop plugin for smart resizing – Link
Seam carving: content-aware image resizing – Link

2 Responses to Open Source Seam Carving

  1. I found an open source python version of this which was implemented shortly after the talk was given.
    http://blog.eikke.com/index.php/ikke/2007/09/02/seam_carving_content_aware_image_resizin

  2. Anyone who’s used the gimp plugin, can you explain how to use it once it’s installed?

    I have it installed, and it shows up in the menu, but I don’t know how to make it do anything at all.

    Can anyone point to a tutorial?

    Cheers,

    timothy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s