Title: Graph Cuts and Stereo
1Graph Cuts and Stereo
- Jim Rehg
- Many slides from Yuri Boykov
2MRF framework in the context of stereo
- neighborhood relationships (n-links)
MRF defining property
Hammersley-Clifford Theorem
3MAP estimation of MRF configuration
4Energy minimization
5Generalized Potts model
6Graph cuts for spatially coherent stereo on 2D
grids
We will globally minimize the same energy of
disparities for pixels p on a grid G
spatial coherence
photo consistency
7Pixel interactions Vconvex vs.
discontinuity-preserving
Robust discontinuity preserving Interactions V
Convex Interactions V
V(dL)
dLLp-Lq
8Pixel interactionsconvex vs.
discontinuity-preserving
9a-expansionsexamples of metric interactions
10Graph Cuts Basics (see Cormens book)Simple 2D
example
Goal divide the graph into two parts separating
red and blue nodes
A graph with two terminals S and T
- Cut cost is a sum of severed edge weights
- Minimum cost s-t cut can be found in polynomial
time
11Minimum s-t cuts algorithms
- Augmenting paths Ford Fulkerson, 1962
- Push-relabel Goldberg-Tarjan, 1986
12Augmenting Paths
- Find a path from S to T along non-saturated edges
- Increase flow along this path until some edge
saturates
13Augmenting Paths
- Find a path from S to T along non-saturated edges
- Increase flow along this path until some edge
saturates
14Augmenting Paths
- Find a path from S to T along non-saturated edges
- Increase flow along this path until some edge
saturates
Iterate until all paths
from S to T have at least one saturated edge
MAX FLOW
15Lemma on Flow-Cut
T
S
16Minimization of E(f) via graph cuts
p-vertices (pixels)
17Multiway cut
vertices V pixels terminals
Remove a subset of edges C
edges E n-links t-links
- C is a multiway cut if terminals are separated
in G(C)
18Main Result (generalized Potts model)
- Under some technical conditions on
the multiway min-cut C on G gives___
that minimizes E( f ) - the posterior energy
function for the generalized Potts model.
- Multiway cut Problem find minimum cost
multiway cut C graph G
19Solving multiway cut problem
- Case of two terminals
- max-flow algorithm (Ford, Fulkerson 1964)
- polinomial time (almost linear in practice).
- NP-complete if the number of labels gt2
- (Dahlhaus et al., 1992)
- Efficient approximation algorithms that are
optimal within a factor of 2
20a-expansion algorithm
- Start with any initial solution
- For each label a in any (e.g. random) order
- Compute optimal a-expansion move (s-t graph cuts)
- Decline the move if there is no energy decrease
- Stop when no expansion move would decrease energy
21a-expansion move
Basic idea
break multi-way cut computation into a sequence
of binary s-t cuts
22a-expansion moves
In each a-expansion a given label a grabs
space from other labels
For each move we choose expansion that gives the
largest decrease in the energy binary
optimization problem
23Multi-scan-line stereo with s-t graph cuts
(RoyCox98)
24Multi-scan-line stereo with s-t graph cuts
(RoyCox98)
25IshikawaGeiger 98 What energy do we minimize
this way?
Concentrate on one pair of neighboring pixels
26IshikawaGeiger 98 What energy do we minimize
this way?
Concentrate on one pair of neighboring pixels
27IshikawaGeiger 98 What energy do we minimize
this way?
The combined energy over the entire grid G is
(photo consistency) cost of vertical edges
cost of horizontal edges (spatial consistency)
28Scan-line stereo vs. Multi-scan-line stereo
s-t Graph Cuts (multi-scan-line optimization)
Dynamic Programming (single scan line
optimization)
29Some results from RoyCox
multi scan line stereo (graph cuts)
single scan-line stereo (DP)
30Some results from RoyCox
multi scan line stereo (graph cuts)
single scan-line stereo (DP)