No BSD License  

Highlights from
Seam Carving for content aware image resizing

4.6

4.6 | 7 ratings Rate this file 32 Downloads (last 30 days) File Size: 2.79 KB File ID: #16123
image thumbnail

Seam Carving for content aware image resizing

by Aslak Grinsted

 

28 Aug 2007 (Updated 27 Sep 2007)

illustrative example of the seam carving algorithm.

Editor's Notes:

This was a File Exchange Pick of the Week

| 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 (9)
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!

20 Apr 2010 fido genial

great work!!! How do you increase the size of the image... I see only seam removal...

10 May 2010 Karthik Muthuswamy

Really nice piece of code. Works like a charm!

28 Oct 2010 mahdi Esfahanian  
28 Oct 2010 mahdi Esfahanian  
28 Oct 2010 mahdi Esfahanian  
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

Contact us at files@mathworks.com