Upload
justin-warner
View
214
Download
0
Tags:
Embed Size (px)
Citation preview
HU JUNFENG 2015-11-25
Interactive Image Cutout- Lazy Snapping
“Lazy Snapping”, SIGGRAPH 2004Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum
Interactive image cutout
Lazy snapping Demo
Grabcut Demo
Image cutout is the technique of removing an object from its background
Interactive image cutout
Lazy snapping Demo
Grabcut Demo
Image cutout is the technique of removing an object from its background
Lazy snapping
Step 1: a quick object marking step Work at a coarse scale Specifies the object of interest by a few marking lines
Step 2: a simple boundary editing step Work at a finer scale Edit the object boundary by simply clicking and
dragging polygon vertices
Object marking
UI design Two groups of lines for the representative parts of
foreground and background
Representative clustering centers K-means method to obtain 64 clusters
for each class
: for foreground
: for background
{ }FnK
{ }BnK
K-means clustering
Iterating the 4 steps below
Seed initialization Assigning elements
Seed updating Assigning again
Object marking
Foreground/background image segmentationA typical graph-cut problem
Intuition:
classifying the pixels into two groups, which has the Similar feature in this group;
each group has the smoothness assumption, a Commonly used prior knowledge
Graph cut image segmentation
An image cutout problem can be posed as a binary labelling problem on a graph G=(V, E)V: the nodes represent all the pixelsE: the edge linking two neighboring pixels (4-neighborhood)
i: the i-th node Background
Foreground
Edge
1 foreground
0 background
{ }
i
i
x
soluton X x
Graph cut image segmentation
Corresponding to above 2 intuitive steps Define the likelihood energy :
Define the prior energy :
Minimize the above two terms simultaneously
1( )iE x
2 ( , )i jE x x
Encoding the cost when the label of node i is xi
The smaller, the better
Encoding the cost when the label of node i and node j is xi and xj
The smaller, the better
Graph cut image segmentation
The likelihood energy
The prior energy
Graph cuts
Min cut == Max flow
Max flow problem
Bottleneck problem
General algorithms: Ford-Fulkerson algorithm, push-relabel maximum flow new algorithm by Boykov, etc
Boundary editing
Boundary as editable polygon First vertex – border pixel with highest curvature Next vertices: furthest boundary pixel from previous
polygon Stop when distance is below some threshold
UI design/Tools Direct vertex editing Overriding brush
Using graph cuts
Experimental results
分组大作业
Project 1 彩色直方图均衡优化 1 人组 时间: 12 月 11号
Project 2 图像分割 2 人组 提交时间: 12 月 11 号Project 3 图像中物体识别 2-3 人组 提交时间: 12 月 23
号Project 4 使用目标均衡化方法对古代绘画色彩还原 2-3
人组, 12 月 23 号