Computational Photography
Si Lu
Spring 2018
http://web.cecs.pdx.edu/~lusi/CS510/CS510_Computati
- nal_Photography.htm
05/10/2018
Computational Photography Si Lu Spring 2018 - - PowerPoint PPT Presentation
Computational Photography Si Lu Spring 2018 http://web.cecs.pdx.edu/~lusi/CS510/CS510_Computati onal_Photography.htm 05/10/2018 Last Time o Image segmentation n Normalized cut and segmentation 2 Today o Segmentation n Interactive image
http://web.cecs.pdx.edu/~lusi/CS510/CS510_Computati
05/10/2018
2
3
Images from Rother et al. 2004
Magic Wand (Photoshop) Intelligent Scissors
Mortensen and Barrett (1995)
GrabCut
Rother et al. 2004
4
Images from Sun et al. 2004
F B F F F F B B B
5
Slide credit: Y.Y. Chuang
n
n Very general situation n Will be minimized
n Probability that this color belongs to F (resp. B)
n Penalty for having different label n Penalty is down-weighted if the two pixel colors are very different n Similar in spirit to bilateral filter
One labeling (ok, not best) Data Smoothness
6
Slide credit: F. Durand
7
Slide credit: F. Durand
8
Slide credit: F. Durand
n e.g. 8-neighborhood (but I show 4 for simplicity)
n e.g. exp(-||Ci-Cj||2/22) n where can be a constant
9
Slide credit: F. Durand
10
Slide credit: F. Durand
Desired result
11
Slide credit: F. Durand
12
Slide credit: F. Durand
13
Slide credit: F. Durand
cut
14
Slide credit: F. Durand
cut
15
Slide credit: F. Durand
n Matlab wrapper: http://www.wisdom.weizmann.ac.il/~bagon/matlab.html
Code: http://vision.ucla.edu/~brian/gcmex.html
n Yuri Boykov, Olga Veksler and Ramin Zabih, Fast Approximate Energy Minimization via Graph Cuts, International Conference on Computer Vision, September 1999.
16
Slide credit: Y.Y. Chuang
GrabCut – Interactive Foreground Extraction 1
GrabCut – Interactive Foreground Extraction 4
GrabCut – Interactive Foreground Extraction 5
Cut: separating source and sink; Energy: collection of edges Min Cut: Global minimal enegry in polynomial time
GrabCut – Interactive Foreground Extraction 6
1 2 3 4
GrabCut – Interactive Foreground Extraction 7
Gaussian Mixture Model (typically 5-8 components)
Foregroun d & Backgroun d Backgroun d Foregroun d Backgroun d
G
GrabCut – Interactive Foreground Extraction 8
R G R
Iterated graph cut
GrabCut – Interactive Foreground Extraction 9
Blake et al. (2004): Learn jointly
GrabCut – Interactive Foreground Extraction 10
Camouflage & Low Contrast No telepathy Fine structure
Initial Rectangle Initial Result
GrabCut – Interactive Foreground Extraction 11
Available online: http://research.microsoft.com/vision/cambridge/segmentation/
GrabCut – Interactive Foreground Extraction 12
GrabCut Boykov and Jolly (2001)
Error Rate: 0.72% Error Rate: 1.87% Error Rate: 1.81% Error Rate: 1.32% Error Rate: 1.25% Error Rate: 0.72% GrabCut – Interactive Foreground Extraction 13
User Input Result
Magic Wand (198?) Intelligent Scissors Mortensen and Barrett (1995) GrabCut Rother et al. (2004) Graph Cuts Boykov and Jolly (2001) LazySnapping Li et al. (2004) GrabCut – Interactive Foreground Extraction 22
30
Aseem Agarwala, Mira Dontcheva, Maneesh Agrawala, Steven Drucker, Alex Colburn, Brian Curless, David Salesin, Michael Cohen, “Interactive Digital Photomontage”, SIGGRAPH 2004 Slide credit: Y.Y. Chuang
31
Slide credit: Y.Y. Chuang
32
Slide credit: Y.Y. Chuang
33
Slide credit: Y.Y. Chuang
34
Slide credit: Y.Y. Chuang
35
Slide credit: Y.Y. Chuang
36
Slide credit: Y.Y. Chuang
photomontage set of originals
37
Slide credit: Y.Y. Chuang
Source images Brush strokes Computed labeling Composite
38
Slide credit: Y.Y. Chuang
Brush strokes Computed labeling
39
Slide credit: Y.Y. Chuang
40