360 likes | 728 Views
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
E N D
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 flowin 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
Cut • 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
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
12 v1 v3 16 20 s 10 4 t 7 9 13 4 v2 v4 14 Ford–Fulkerson algorithm
12 v1 v3 16 20 s 10 4 t 7 9 13 4 v2 v4 14 Ford–Fulkerson algorithm
12 v1 v3 16 20 s 10 4 t 7 9 13 4 v2 v4 14 Ford–Fulkerson algorithm
4/12 v1 v3 4/16 20 s 10 4 t 7 4/9 13 4/4 v2 v4 4/14 Ford–Fulkerson algorithm
8 v1 v3 12 20 s 10 t 7 4 5 13 10 v2 v4 Ford–Fulkerson algorithm
v1 v3 7/12 7/20 s 4 7/10 t 7/7 5 13 v2 v4 7/10 Ford–Fulkerson algorithm 8
8 v1 v3 5 13 s 3 t 4 5 13 3 v2 v4 Ford–Fulkerson algorithm
4/8 v1 v3 4/13 5 s 3 4/4 t 5 4/13 v2 v4 3 Ford–Fulkerson algorithm
4 v1 v3 5 9 s 3 t 5 9 3 v2 v4 Ford–Fulkerson algorithm
4/4 v1 v3 4/5 4/9 s 3 t 5 9 3 v2 v4 Ford–Fulkerson algorithm
Ford–Fulkerson algorithm v1 v3 1 5 15/16 15/20 s 3 t 5 7/10 4/9 9 4/13 3 v2 v4 11/14
Ford–Fulkerson algorithm v1 v3 19/20 15/16 15/20 s t 7/10 4/9 0/9 4/13 v2 v4 11/14 8/13
12/12 v1 v3 15/16 19/20 s 3/10 4 t 7/7 9 8/13 4/4 v2 v4 Ford–Fulkerson algorithm 11/14 a convenient tool: http://www.lix.polytechnique.fr/~durr/MaxFlow/
Outline • Background • Graph cut • Ford–Fulkerson algorithm • Application • Extended reading
0 0 0 0 99 92 101 100 ? ? ? ? 10 10 10 0 1 2 3 100 79 98 114 1 1 1 1 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) Energy(0000) = 99+92+100+101 = 392 Energy(0001) = = 99+92+100+98+10 = 399
1100 101 99 100 92 79 114 100 98 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 3 13 12 2 ? ? ? ? 10 10 10 9 7 0 1 2 3 14 4 1 1 1 Total Flow Pushed = 99+79+100+98 +1 +10 +3 =390 Max Flow (Energy of the cut 1100)
0 0 0 0 99 92 101 100 10 10 10 ? ? ? ? 0 1 2 3 100 79 98 114 1 1 1 1 Exhaustive Search • List all the combinations and corresponding energy • Example: 1100 has the minimal energy of 390
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