1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.

Post on 01-Jan-2016

217 views 0 download

Tags:

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

1

Optimal CycleOptimal CycleVida MovahediVida Movahedi

Elder Lab, January 2008Elder 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

3/16

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

the cost of being on boundary (Gestalt)

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

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

)(

)(

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

)(

)()(

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

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

9/16

ProofProof

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

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

12/16

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

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

14/16

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

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

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 .