Top Banner
Graph Cut 韋韋 2010/2/22
35

Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Dec 30, 2015

Download

Documents

Mercy Long
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Graph Cut

韋弘 2010/2/22

Page 2: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Outline

Background Graph cut Ford–Fulkerson algorithm Application Extended reading

Page 3: 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

Page 4: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Weighted graph

a number (weight) is assigned to each edge

weights might represent : costs, lengths or capacities,

etc. depending on the problem

Page 5: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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:

Page 6: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Flow network

a flow in G is a real-valued function f : VXV→R

that satisfies the following three properties:

Page 7: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Max-flow a feasible flow through a single-source, single-sink that

is maximum

Page 8: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Outline

Background Graph cut Ford–Fulkerson algorithm Application Extended reading

Page 9: Graph Cut 韋弘 2010/2/22. 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

Page 10: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

The cost of a cut

-1+12-1+14-(13+16+9+20-4)=-30

Page 11: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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.

Page 12: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Outline

Background Graph cut Ford–Fulkerson algorithm Application Extended reading

Page 13: Graph Cut 韋弘 2010/2/22. 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

Page 14: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

Page 15: Graph Cut 韋弘 2010/2/22. 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

Page 16: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

16

13

10 49 7

14

4

20

12

Page 17: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

4/16

13

10 44/9 7

4/14

4/4

20

4/12

Page 18: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

12

13

10 4 5

8

7

20

10

Page 19: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

7/10

s

v4v2

v3v1

t

7/12

13

7/10 45 7/7

7/20

8

Page 20: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

5

13

3 4 5

8

13

3

Page 21: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

5

4/13

3 4/45

3

4/13

4/8

Page 22: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

5

9

35

4

9

3

Page 23: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

4/5

9

35

4/4

4/9

3

Page 24: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Ford–Fulkerson algorithm

s

v4v2

v3v1

t

1

9

35

5

34/13

7/10

15/16

4/9

11/14

15/20

Page 25: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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

Page 26: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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/

Page 27: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Outline

Background Graph cut Ford–Fulkerson algorithm Application Extended reading

Page 28: Graph Cut 韋弘 2010/2/22. 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

Page 29: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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

Page 30: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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

Page 31: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

Outline

Background Graph cut Ford–Fulkerson algorithm Application Extended reading

Page 32: Graph Cut 韋弘 2010/2/22. 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

Page 33: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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

Page 34: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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

Page 35: Graph Cut 韋弘 2010/2/22. Outline Background Graph cut Ford–Fulkerson algorithm Application Extended reading.

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