5.0

5.0 | 2 ratings Rate this file 157 downloads (last 30 days) File Size: 2.79 KB File ID: #16123

Seam Carving for content aware image resizing

by Aslak Grinsted

 

28 Aug 2007 (Updated 27 Sep 2007)

No BSD License  

illustrative example of the seam carving algorithm.

Editor's Notes:

This was a File Exchange Pick of the Week

Download Now | Watch this File

File Information
Description

illustrative example of Seam carving for content aware image resizing
 
 
  usage: carvedimg=seamcarving(im,k)
 
  k is how many vertical seams to remove.
  im is the image.
 
  example:
    img=imread('peppers.png')
    carvedimg=seamcarving(img,50)
    image([carvedimg img]);
    axis equal;
 
  Author: Aslak Grinsted 2007...
  Based on ideas from Avidan & Shamir:
  http://video.google.com/videoplay?docid=-6221880321193117495
  Note i haven't read their paper and they have probably lots of smart tricks for optimizations.

Acknowledgements
This submission has inspired the following:
Seam Carving for content aware image resizing: GUI implementation demo
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
04 Sep 2007 Gerd Kunert

Requires Image Processing Toolbox!

05 Sep 2007 Aslak Grinsted

It only requires image processing toolbox in order to load the demo images. Try loading one of your own and applying it to that instead. --Anyway i have tried to remove this dependency in a new version just uploaded.

02 Oct 2007 fabrice clavel  
07 Mar 2008 kkk kkk

great!

Please login to add a comment or rating.
Updates
29 Aug 2007

Improved various small things suggested by Doug Hall and made some small optimizations.
* handle grayscale images
* add nice demo mode

29 Aug 2007

Fixed a bug that prevented it to run outside demo-mode.

29 Aug 2007

Changed costfunction to the same as used in the google video clip. works better for some images but slightly slower.

27 Sep 2007

* Removed demo dependency on the image processing toolbox.
* Made compatible with older versions of matlab.

Tag Activity for this File
Tag Applied By Date/Time
seam carving Aslak Grinsted 22 Oct 2008 09:24:38
image resizing Aslak Grinsted 22 Oct 2008 09:24:38
content aware Aslak Grinsted 22 Oct 2008 09:24:38
example Aslak Grinsted 22 Oct 2008 09:24:38
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com