Upload
mercy-long
View
246
Download
2
Embed Size (px)
Citation preview
Graph Cut
韋弘 2010/2/22
Outline
Background Graph cut Ford–Fulkerson algorithm Application Extended reading
Graph
G = <V, E>
ex : G=<3,6> G=<3,3>
Undirected Directed
Weighted graph
a number (weight) is assigned to each edge
weights might represent : costs, lengths or capacities,
etc. depending on the problem
Flow network
a directed graph where each edge has a positive capacity(weight)
two special vertices are designated the source s and the sink t
ex:
Flow network
a flow in G is a real-valued function f : VXV→R
that satisfies the following three properties:
Max-flow a feasible flow through a single-source, single-sink that
is maximum
Outline
Background Graph cut Ford–Fulkerson algorithm Application Extended reading
a subset of edges such that source &sink become separated
G(C)=<V,E\C>
the cost of a cut :
Minimum cut : a cut whose cost is the least over all cuts
Cut
C E
The cost of a cut
-1+12-1+14-(13+16+9+20-4)=-30
The max-flow min-cut theorem
If f is a flow in a flow network G = (V;E) with source s and sink t then the value of the maximum flow is equal to the capacity of a minimum cut.
Refer to T.H. Cormen, C.E. Leiserson and R.L. Rivest, .Introduction to
Algorithms., McGraw-Hill, 1990.
for the prove.
Outline
Background Graph cut Ford–Fulkerson algorithm Application Extended reading
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
16
13
10 49 7
4
20
12
14
Ford–Fulkerson algorithm
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
16
13
10 49 7
4
20
12
14
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
16
13
10 49 7
14
4
20
12
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
4/16
13
10 44/9 7
4/14
4/4
20
4/12
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
12
13
10 4 5
8
7
20
10
Ford–Fulkerson algorithm
7/10
s
v4v2
v3v1
t
7/12
13
7/10 45 7/7
7/20
8
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
5
13
3 4 5
8
13
3
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
5
4/13
3 4/45
3
4/13
4/8
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
5
9
35
4
9
3
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
4/5
9
35
4/4
4/9
3
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
1
9
35
5
34/13
7/10
15/16
4/9
11/14
15/20
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
4/13
7/10
15/16
4/9
11/14
15/20
8/13
0/9
19/20
Ford–Fulkerson algorithm
s
v4v2
v3v1
t
15/16
8/13
3/10 49 7/7
4/4
19/20
12/12
11/14
a convenient tool: http://www.lix.polytechnique.fr/~durr/MaxFlow/
Outline
Background Graph cut Ford–Fulkerson algorithm Application Extended reading
Combinatorial Optimization Determine a combination (pattern, set of labels) such that the
energy of this combination is minimum Example: 4-bit binary label problem
Find a label-set which yields the minimal energy Each individual bit can be set as 0 or 1
Each label corresponds to an energy cost Each neighboring bit pair is better to have the same label (smoothness)
? ? ??0 1 2 3
10 10 10
99 92 100 101
100 79 114 98
0
1
0
1
0
1
0
1
Energy(0000)
Energy(0001) =
= 99+92+100+101= 392
= 99+92+100+98+10= 399
100 11498
79
10110099 92
14
Graph-Cut Formulate the previous problem into a graph-cut problem Find the cut with minimum total cost(energy) Solving the graph-cut: Ford-Fulkerson Method
? ? ??0 1 2 3
10 10
0
1
10
1
13 3
9
122
4
7
1
99+79+100+98+1+10+3 =390 Max Flow (Energy of the cut 1100)Total Flow Pushed=
1100
Exhaustive Search List all the combinations and corresponding energy Example: 1100 has the minimal energy of 390
Label set Energy Label set Energy0000 392 1000 403
0001 399 1001 410
0010 426 1010 437
0011 413 1011 424
0100 399 1100 390
0101 414 1101 397
0110 413 1110 404
0111 400 1111 391
? ? ??0 1 2 310 10 10
99 92 100 101
100 79 114 98
0
1
0
1
0
1
0
1
Outline
Background Graph cut Ford–Fulkerson algorithm Application Extended reading
Graph Cut algorithms used in image reconstruction Greig, D., Porteous, B.Seheult, A., Exact Maximum A Posteriori Estimation
for Binary Images, J. Royal Statistical Soc., Series B, vol. 51, no. 2, pp. 271-279, 1989
Boykov, Y., Veksler, O.Zabih, R., Fast Approximate Energy Minimization via Graph Cuts, Proc. IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 23, no. 11, pp. 1222-123, 2001
Boykov, Y., Veksler, O.Zabih, R., Markov Random Fields with Efficient Approximations, Proc. IEEE Conf. Computer Vision and Pattern Recognition, pp. 648-655, 1998
Ishikawa, H., Geiger, D., Segmentation by Grouping Junctions, Proc. IEEE Conf. Computer Vision and Pattern Recognition, pp. 125-131, 1998
Graph Cut algorithms used in stereo vision Birchfield, S., Tomasi, C., Multiway Cut for Stereo and Motion with Slanted
Surfaces, Proc. Int’l Conf. Computer Vision, pp. 489-495, 1999
Ishikawa, H., Geiger, D.Zabih, R., Occlusions, Discontinuities, and Epipolar Lines in Stereo, Proc. Int’l Conf. Computer Vision, pp. 1033-1040, 2003
Kim, J., Kolmogorov, V., Visual Correspondence Using Energy Minimization and Mutual Information, Proc. Int’l Conf. Computer Vision, pp. 508-515, 2001
Kolmogorov, V., Zabih, R., Visual Correspondence with Occlusions Using Graph Cuts, PhD thesis, Stanford Univ., Dec. 2002
Lin, M.H., Surfaces with Occlusions from Layered Stereo, Int’l J. Computer Vision, vol. 1, no. 2, pp. 1-15, 1999
Graph Cut algorithms used in image segmentation Boykov , Y., Kolmogorov, V., Computing Geodesics and Minimal Surfaces
via Graph Cuts,Proc. European Conf. Computer Vision, pp. 232-248, 1998
Graph Cut algorithms used in multi-camera scene reconstruction
Roy, S., Cox, I., A Maximum-Flow Formulation of the n-Camera Stereo Correspondence Problem, Proc. Int’l Conf. Computer Vision, pp. 26-33, 2003
Kolmogorov, V., Zabih, R., Multi-Camera Scene Reconstruction via Graph Cuts, Proc. European Conf. Computer Vision, vol. 3, pp. 82-96, 2002