hu junfeng 2015-11-25 interactive image cutout- lazy snapping “lazy snapping”, siggraph 2004 yin...
TRANSCRIPT
![Page 1: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/1.jpg)
HU JUNFENG 2015-11-25
Interactive Image Cutout- Lazy Snapping
“Lazy Snapping”, SIGGRAPH 2004Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum
![Page 2: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/2.jpg)
Interactive image cutout
Lazy snapping Demo
Grabcut Demo
Image cutout is the technique of removing an object from its background
![Page 3: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/3.jpg)
Interactive image cutout
Lazy snapping Demo
Grabcut Demo
Image cutout is the technique of removing an object from its background
![Page 4: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/4.jpg)
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
![Page 5: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/5.jpg)
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
![Page 6: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/6.jpg)
K-means clustering
Iterating the 4 steps below
Seed initialization Assigning elements
Seed updating Assigning again
![Page 7: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/7.jpg)
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
![Page 8: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/8.jpg)
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
![Page 9: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/9.jpg)
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
![Page 10: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/10.jpg)
Graph cut image segmentation
The likelihood energy
The prior energy
![Page 11: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/11.jpg)
Graph cuts
Min cut == Max flow
![Page 12: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/12.jpg)
Max flow problem
Bottleneck problem
General algorithms: Ford-Fulkerson algorithm, push-relabel maximum flow new algorithm by Boykov, etc
![Page 13: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/13.jpg)
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
![Page 14: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/14.jpg)
Experimental results
![Page 15: HU JUNFENG 2015-11-25 Interactive Image Cutout- Lazy Snapping “Lazy Snapping”, SIGGRAPH 2004 Yin Li, Jian Sun, Chi-Keung Tang, Heung-Yeung Shum](https://reader035.vdocuments.net/reader035/viewer/2022070414/5697c0271a28abf838cd65bf/html5/thumbnails/15.jpg)
分组大作业
Project 1 彩色直方图均衡优化 1 人组 时间: 12 月 11号
Project 2 图像分割 2 人组 提交时间: 12 月 11 号Project 3 图像中物体识别 2-3 人组 提交时间: 12 月 23
号Project 4 使用目标均衡化方法对古代绘画色彩还原 2-3
人组, 12 月 23 号