Seam carving

Shai Avidan and Ariel Shamir made a cool image resizer.
It's terrifically easy to implement the basic technique. Try this thing I made.

Took about an hour or so.


  1. Fun! Now you need the bit about painting the scene with a low and high priority brush for the parts you do/don't want deleted. Also, you've got a minor bug where you're missing key-up events.

    I tried running it on a picture with lots of vertical and horizontal lines. Since I can't inline images here, check it out. Funky.

  2. Very nice. Better then this this online version:

    Shrinking pictures of faces creates really nutty caricatures!

  3. Hi,
    If you are looking for a software to try out seam carving, you might also want to take a look at

    The program that you can download there (for Windows and Linux, and free) is already highly optimized concerning speed, and apart from enlarging or decreasing image size you can also use masks to protect or delete certain parts of your image.

    Have fun,

  4. Hi, I've implemented the seam carving algorithm in MATLAB with GUI and complete documentation and tutorial so that others new to seam carving can more easily understand the operations involved. My source code and documentation can be found here: