Bài giảng Nhập môn thị giác máy tính - Chapter 7: Seam carving - Lê Thanh Hải
Chapter 7 – Seam Carving
7-1
Chapter 7
Seam Carving
Michael Rubinstein, MIT
Shai Avidan, Mitsubishi Electric Research Labs
Ariel Shamir, The Interdisciplinary Center & MERL
Department of Mechatronics
Chapter 7 – Seam Carving
7-2
Contents
Image resizing
• Seam Carving algorithm
Department of Mechatronics
Chapter 7 – Seam Carving
7-3
Display Devices
Department of Mechatronics
Chapter 7 – Seam Carving
7-4
Content Retargeting
iPhone
PC
Department of Mechatronics
Chapter 7 – Seam Carving
7-5
Page Layout
Department of Mechatronics
Chapter 7 – Seam Carving
7-6
Simple Media Retargeting Operators
LettSecrabloinxging
Departmen
Chapter 7 – Seam Carving
7-7
Content-aware Retargeting Operators
“Important”
content
Content-
aware
Content-
oblivious
Department of Mechatronics
Chapter 7 – Seam Carving
7-8
Content-aware Retargeting
Scale
Crop
Content-aware
“less-Important”
content
Input
Department of Mechatronics
Chapter 7 – Seam Carving
7-9
Image Retargeting
• Problem statement:
• Input Image I with size n × m, and new size n’ × m’
• Output Image ꢀ푰 of size n’ × m’ which will be “good
representative” of the original image I
• To date, no agreed definition, or measure, as to what a
good representative is in this context!
Department of Mechatronics
Chapter 7 – Seam Carving
7-10
Image/Video Retargeting
• In large, we would expect:
1. Adhere to the geometric constraints (display/aspect ratio)
2. Preserve the important content and structures
3. Limit artifacts
4. Perhaps a new representation that will support different
sizes?
• Very ill-posed!
o How do we define important? Is there a universal ground
truth?
o Would different viewers think the same about a retargeted
image?
o What about artistic impression in the original content?
Department of Mechatronics
Chapter 7 – Seam Carving
7-11
Importance (Saliency) Measures
• A function S: p [0,1]
Wang et al. 2008
• More sophisticated: attention models, eye tracking (gazing
studies), face detectors, …
Judd et al. ICCV09 Learning to predict where people look
Department of Mechatronics
Chapter 7 – Seam Carving
7-12
General Retargeting Framework
1. Define an energy function E(I)
(interest, importance, saliency)
2. Use some operator(s)
to change the image I
Setlur et al.
[2005]
Recompose
Santella
et al.
Crop
Warp
[2005]
Gal et al.
[2006]
Department of Mechatronics
Chapter 7 – Seam Carving
7-13
Previous Retargeting Approaches
• Optimal Cropping Window
• For videos: “Pan and scan”
Still done manually in the movie industry
Liu and Gleicher, Video Retargeting: Automating Pan and Scan (2006)
Department of Mechatronics
Chapter 7 – Seam Carving
7-14
Cropping
Department of Mechatronics
Chapter 7 – Seam Carving
7-15
Seam Carving
• Assume m × n m × n’, n’ < n
• Basic Idea: remove unimportant pixels from the image
o Unimportant = pixels with less “energy”
• Intuition for gradient-based energy:
o Preserve strong contours
o Human vision more sensitive to edges – so try remove content
from smoother areas
o Simple, enough for producing some nice results
o See their paper for more measures they have used
Department of Mechatronics
Chapter 7 – Seam Carving
7-16
Pixel Removal
Least-energy pixels
(per row)
Optimal
Least-energy columns
Department of Mechatronics
Chapter 7 – Seam Carving
7-17
A Seam
• A connected path of pixels from top to bottom (or left to right).
Exactly one in each row
Department of Mechatronics
Chapter 7 – Seam Carving
7-18
Seams in Images
. Efros & Freeman [2001] – Texture synthesis
. Kwatra et al. [2003] – Image and video synthesis
. Agarwala et al. [2004] – Digital Photomontage
Mostly used for composition of
. Perez et al.
. Jia et al. [20
two (or more) images or patches…
. Rother et al.
. Wang and Cohen [2006] – simultaneous matting and
compositing
Agarwala et al., Interactive Digital Photomontage
Department of Mechatronics
Chapter 7 – Seam Carving
7-19
Finding the Seam?
Department of Mechatronics
Chapter 7 – Seam Carving
7-20
The Optimal Seam
s* = argmin E(s)
∂
∂
E(I) =| I | + | I |
∂x ∂y
S
Department of Mechatronics
Tải về để xem bản đầy đủ
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Nhập môn thị giác máy tính - Chapter 7: Seam carving - Lê Thanh Hải", để tải tài liệu gốc về máy hãy click vào nút Download ở trên
File đính kèm:
bai_giang_nhap_mon_thi_giac_may_tinh_chapter_7_seam_carving.pdf

