Beruflich Dokumente
Kultur Dokumente
part I
Basics of Graph Cuts
hard
t
n-links a cut
constraint
hard
constraint
s
∆I pq
wpq = exp − 2
Minimum cost cut can be 2σ
computed in polynomial time
(max-flow/min-cut algorithms) σ
∆I pq
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
“Augmenting Paths”
“Augmenting Paths”
“Augmenting Paths”
Iterate until …
A graph with two terminals all paths from S to T have
at least one saturated edge
MAX FLOW MIN CUT
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Optimal boundary in 2D
“max-flow = min-cut”
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Optimal boundary in 3D
3D model of
scene
ρ(x)
photoconsistency
Estimating photoconsistency
in a narrow bad
Occlusion
Sink
visual hull
(silhouettes)
a cut
1 2
t
Flux of a vector field through Cut on a directed graph
hypersurface with orientation (A or B)
Cost of a cut includes only edges from the source to the sink components
Cut’s cost (on a directed graph) changes if terminals are swapped
q
α
p
Extra penalty
[Funka-Lea et al.’06] w p − > q ∝ f (∇I ) + c ⋅ (1 − cos(α ))
“blob” prior
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
t
n-links a cut
D p (t )
t-link
t-link
w pq
D p (s )
s
regional bias example
s t
suppose I and I are given Dp (s) = const− | I p − I | s
“expected” intensities
of object and background D p (t ) = const − | I p − I t |
t
n-links a cut
D p (t )
t-link
t-link
w pq
D p (s )
s
“expected” intensities of
s
object and background Dp (s) = const− | I p − I |
I s and I t D p (t ) = const − | I p − I t |
can be re-estimated
NOTE:
EM-style hard constrains
optimization areconstant
of piece-vice not required, in general.
Mumford-Shah model
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Pr(I p | t)
Pr(I p | s)
Dp (t) Ip I
s
given object and background intensity histograms
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
“Shrinking” bias
Minimization of non-negative boundary costs (sum of
non-negative n-links) gives regularization/smoothing of
segmentation results
Choosing n-link costs from local image gradients helps
image-adaptive regularization
“Shrinking” bias
“Shrinking” bias
Image intensities on one scan line
actual
segment
ideal segment
“Shrinking” bias
object protrusion
“Ballooning” force
• favouring bigger volumes that fill the visual hull
L.D. Cohen and I. Cohen. Finite-element methods for active
contour models and balloons for 2-d and 3-d images. PAMI,
15(11):1131–1147, November 1993.
“Shrinking” bias
Uniform ballooning
+ + Laplacian
- - of intensities
graph cuts
Smart regional
terms counteract
shrinking bias
The image is courtesy of David Fleet
University of Toronto
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
0 0 0 1
0 0 0 1
0 1 1 1
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
local oriented
visibility estimate
Regularization
+
uniform
ballooning
Regularization
+
intelligent
ballooning
Space carving
t
n-links a cut
D p (t )
t-link
t-link
w pq
D p (s ) binary object
s segmentation
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Multi-scan-line stereo
with s-t graph cuts (Roy&Cox’98)
x
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Multi-scan-line stereo
with s-t graph cuts (Roy&Cox’98)
t cut
labels
“cut”
Disparity labels
L(p)
y
y
p
s x
x
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
V(dL) V(dL)
dL=Lp-Lq dL=Lp-Lq
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Pixel interactions V:
“convex” vs. “discontinuity-preserving”
Robust
“Convex” “discontinuity preserving”
Interactions V Interactions V
V(dL) V(dL)
Potts
“linear” model
model
dL=Lp-Lq
dL=Lp-Lq
V(dL) V(dL)
dL=Lp-Lq
dL=Lp-Lq
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Pixel interactions:
“convex” vs. “discontinuity-preserving”
“linear” V
truncated
“linear” V
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
Robust interactions
NP-hard problem (3 or more labels)
• two labels can be solved via s-t cuts (Greig at. al., 1989)
a-expansion algorithm
1. Start with any initial solution
2. For each label “a” in any (e.g. random) order
a-expansion move
Basic idea: break multi-way cut computation
into a sequence of binary s-t cuts
a other labels
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
a-expansion moves
In each a-expansion a given label “a” grabs space from other labels
initial solution
-expansion
-expansion
-expansion
-expansion
-expansion
-expansion
-expansion
For each move we choose expansion that gives the largest decrease in
the energy: binary optimization problem
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
a-expansions:
examples of metric interactions
“noisy shaded
“noisy diamond”
diamond”
V (α , β )
V (α , β )
α − β
Potts V α − β Truncated “linear” V
European Conference on Computer Vision 2006 : “Graph Cuts vs. Level Sets”, Y. Boykov (UWO), D. Cremers (U. of Bonn), V. Kolmogorov (UCL)
ground
BVZ truth
KZ1998
2002
depth map
normalized
simulated annealing,
correlation, a-expansions (BVZ 89,01)
start19
forhours,
annealing,
20.3%24.7%
err err 90 seconds, 5.8% err
Annealing Our method
100000
Smoothness Energy
80000
60000
40000
20000
0
1 10 100 1000 10000 100000
Time in seconds