Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Seam Carving

Seam Carving

Content-aware image-resizing

Oursky Limited

August 30, 2012
Tweet

More Decks by Oursky Limited

Other Decks in Research

Transcript

  1. But we want... • Content is more important • don’t

    resize the content please Thursday, 30 August, 12
  2. Definition • Goal is to remove unnoticeable pixels. • Energy

    Function: • Remove Pixels with least energy • Sort pixels by Energy, remove smallest pixels (optimum) • Remove Column with smallest total Energy (column) • Remove Seam with smallest total Energy (seam) Thursday, 30 August, 12
  3. Seam • Vertical Seam: • an 8-connected path of pixels

    in the image from top to bottom, containing one, and only one, pixel in each row of the image Thursday, 30 August, 12
  4. Aspect Ratio Change • Change the image from (n x

    m) to (n x m’) • (assume m’ < m) • Remove m-m’=c seams successively Seam Carving Scaling Thursday, 30 August, 12
  5. Optimal Seam Ordering • Change the image from (n x

    m) to (n’ x m’) • (assume m’ < m and n’ < n) • What to do? What is the correct order of seam carving? • Remove vertical seams first? • Horizontal seams first? • Or alternate between the two? Thursday, 30 August, 12
  6. Optimal Seam Ordering • We optimize • where k=r+c, r=(m-m’),

    c=(n-n’) and αi is used as a parameter that determine if at step i we remove a horizontal or vertical seam: α={0,1} Thursday, 30 August, 12
  7. Image Enlarging • compute the optimal vertical (horizontal) seam ‘s’

    on I • duplicate the pixels of s by averaging them with their left and right neighbors (top and bottom in the horizontal case) Thursday, 30 August, 12
  8. Image Enlarging • To reduce the width by ‘k’, compute

    first ‘k’ vertical seams and duplicate them • All seams duplicated, 50% enlargement. For more do it in steps. Thursday, 30 August, 12
  9. Content Amplification • Scale the image, this will scale everything,

    content as well as non-content. • Shrink the scaled-image by seam carving, this will carve out the non-content part. Thursday, 30 August, 12
  10. Object Removal • User marks the target object to be

    removed. • Then seams are removed from the image until all marked pixels are gone. • To regain the original size, seam insertion is employed. Thursday, 30 August, 12
  11. Limitation • Methods mentioned so far are not real-time. •

    We calculate each seam remove it and calculate the next seam. • Too much content • No space for seam to avoid content Thursday, 30 August, 12
  12. Link • Paper • ftp://ftp1.idc.ac.il/Arik_shamir/SCweb/imret/vidret.pdf • Dynamic Programming for Seam

    Carving Algorithm • http://w3.impa.br/~rdcastan/SeamWeb/Seam%20Carving%20Part %201.pdf • Youtube demo • http://www.youtube.com/watch?v=6NcIJXTlugc • Search google for Seam Carving…. Many many blogs… Thursday, 30 August, 12