1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

16
1 Optimal Cycle Optimal Cycle Vida Movahedi Vida Movahedi Elder Lab, January 2008 Elder Lab, January 2008

Transcript of 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

Page 1: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

1

Optimal CycleOptimal CycleVida MovahediVida Movahedi

Elder Lab, January 2008Elder Lab, January 2008

Page 2: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

2/16

Grouping ProblemGrouping Problem• We have a set of line segments• We want the sequence (ordered subset)

corresponding to an object boundary in image

Page 3: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

3/16

ModelModel• Virtual links• Alternate paths• Alternate Cycle• Each link is assigned a weight indicating

the cost of being on boundary (Gestalt)

Page 4: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

4/16

Reduction to GraphReduction to Graph• Solid edges as nodes, Virtual links as

edges• Assigning the solid edges’ weights to

neighboring virtual links– Wang had the solid edges as links, but looked

for alternate paths

• Main tool in a weighted graph: Shortest Path

• Cycle: a path from a node to itself

Page 5: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

5/16

Graph AlgorithmsGraph Algorithms• Finding a cycle with minimum sum of

weights?• Finding a cycle with minimum mean

weight?

– Could work if all line segments had same lengths, or else prefers more of shorter lines

• Finding a cycle with minimum ratio weight:

N

ewCe

)(

Ce

Ce

el

ew

)(

)(

Page 6: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

6/16

Minimum Ratio Weight AlgorithmMinimum Ratio Weight Algorithm• Given a graph G=<V,E> with all edges e in

E doubly weighted with (e)Z and (e)Z+

• “Ratio weight” for a set of edges is defined as

• We want to find a cycle C* which minimizes W(C) among all cycles as W*

• Let’s call this problem A

EC

Ce

Ce

e

eCW

)(

)()(

Page 7: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

7/16

Minimum Ratio Weight Algorithm Minimum Ratio Weight Algorithm (cont.)(cont.)

• Problem B: Given a graph G=<V,E> with all edges e in E weighted with (e), find the minimum “total weight” cycle

)(minarg*

)(min*

)()(

cycles all ofset

cycles all ofset

CWC

CWW

eCW

C

C

Ce

Page 8: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

8/16

Minimum Ratio Weight Algorithm Minimum Ratio Weight Algorithm (cont.)(cont.)

• First algorithm by Lawler (1966)• Observation: We can define a new edge

weight

• The solution t*, of wt(Ct*)=0, where Ct* is the solution to problem B with weights wt is equal to the minimum ratio weight W* in problem A, and Ct* is equal to C*.

Q where)()()( teteewt

Page 9: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

9/16

ProofProof

Page 10: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

10/16

Minimum Ratio Weight Algorithm Minimum Ratio Weight Algorithm (cont.)(cont.)

• The problem is thus reduced to finding t*, or finding the value of t such that the minimum total weight cycle using wt has zero weight

• Finding the largest value of t such that G weighted by wt has no negative cycle

• Linear search

Page 11: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

11/16

Negative weight cycle Negative weight cycle algorithmalgorithm

• X is the ratio weight of the negative cycle found

• Now we need an algorithm that can detect negative cycles in a graph

Page 12: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

12/16

Negative Weight CycleNegative Weight CycleFirst Algorithm (Huang)First Algorithm (Huang)

Page 13: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

13/16

Negative Weight CycleNegative Weight CycleSecond Algorithm (Wong)Second Algorithm (Wong)

• Finding a minimum weight perfect matching

• Edmond’s polynomial time algorithm

• All solid edges form a trivial perfect matching with zero total weight the min. is nonpositive

Page 14: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

14/16

Negative Weight CycleNegative Weight CycleWang’s algorithm- Cont.Wang’s algorithm- Cont.

Page 15: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

15/16

Negative Weight CycleNegative Weight CycleWong’s algorithm- Cont.Wong’s algorithm- Cont.

• All cycles in a minimum weight perfect matching should have negative total weight

• Choose the one with minimum cycle ratio to return as X in previous linear search

Page 16: 1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

16/16

ReferencesReferences[1] S. Wang et al. (2005), “Salient Closed Boundary

Extraction with Ratio Contour”, IEEE Trans. on Pattern Analysis and Machine Intelligence, vol. 27, no. 4, pp. 546- 561.

[2] I.H. Jermyn and H. Ishikawa (2001),”Globally optimal Regions and Boundaries as Minimum Ratio weight Cycles”, IEEE Trans. on Pattern Analysis and Machine Intelligence, vol. 23, no. 10, pp. 1075-1088.

[3] X. Huang (2006), “Negative-Weight Cycle Algorithms”, Int’l Conf. on Foundations of Computer Science, pp. 109 -115 .