dynamic programming (dp), shortest paths (sp)

16
Dynamic Programming (DP), Shortest Paths (SP) CS664 Lecture 22 Thursday 11/11/04 Some slides care of Yuri Boykov, Dan Huttenlocher

Upload: connor

Post on 19-Jan-2016

37 views

Category:

Documents


0 download

DESCRIPTION

Dynamic Programming (DP), Shortest Paths (SP). CS664 Lecture 22 Thursday 11/11/04 Some slides care of Yuri Boykov, Dan Huttenlocher. Level sets. [Donald Tanguay]. Level sets and curve evolution. Z. A. Shortest path problem. Lecture theme. B. A. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Dynamic Programming (DP), Shortest Paths (SP)

Dynamic Programming (DP),Shortest Paths (SP)

CS664 Lecture 22Thursday 11/11/04

Some slides care of Yuri Boykov, Dan Huttenlocher

Page 2: Dynamic Programming (DP), Shortest Paths (SP)

),(0 yxuz t

Level sets

),(1 yxuz t

[Donald Tanguay]

Page 3: Dynamic Programming (DP), Shortest Paths (SP)

Level sets and curve evolution

uVt

uVNCt

u

udiv

u

uN

Page 4: Dynamic Programming (DP), Shortest Paths (SP)

Shortest path problem

A

Z

Lecture

theme

Page 5: Dynamic Programming (DP), Shortest Paths (SP)

Dijkstra algorithm

A

B

- processed nodes (distance to A is known)- active nodes (front)

- active node with the smallest distance value

Page 6: Dynamic Programming (DP), Shortest Paths (SP)

Graph edges are “cheap” in places with high intensity gradients

Example:

Shortest paths segmentation

1

23

4

Page 7: Dynamic Programming (DP), Shortest Paths (SP)

Shortest pathsapproach

Shortest paths segmentation

Example: find the shortest

closed contour in a given domain of a

graph

Compute the shortest path p ->p for a point

p.

p

Repeat for all points on the black line. Then choose the optimal

contour.

Page 8: Dynamic Programming (DP), Shortest Paths (SP)

DP (SP) for stereo

leftSp

ppp ddE ),( 1

Disparities of pixels in the scan line

leftS

),...,,( 21 ndddE

photoconsistency

2)(

left

pSp

rightdp

leftp II

regularization

leftSp

pp dd 21)(

Page 9: Dynamic Programming (DP), Shortest Paths (SP)

Discrete snakes Represent the snake as a set of

points Curve as spline, e.g. (particle method)

Local update problem can be solved exactly (compute global min) Do this repeatedly

Problems with collisions, change of topology

Page 10: Dynamic Programming (DP), Shortest Paths (SP)

Discrete snake energy

Best location of the last vertex vn depends only the location of vn-1

Page 11: Dynamic Programming (DP), Shortest Paths (SP)

1v2v

3v

4v6v

5v

),(...),(),(),...,,( 1132221121 nnnn vvEvvEvvEvvvE First-order interactions

control points

Discrete snakes example

Fold data term into smoothness term

Page 12: Dynamic Programming (DP), Shortest Paths (SP)

),(...),(),(),...,,( 1132221121 nnnn vvEvvEvvEvvvE

Energy minimization by SP

A B

states

1

2

m

site

s

1v 2v 3v 4v nv),( 322 vvE),( 211 vvE ),( 322 vvE ),( 322 vvE

Page 13: Dynamic Programming (DP), Shortest Paths (SP)

Distance transform (DT)

yxxDTPy

P min)(

Py

xyxxDT

P

Py

P

,01

)(1min)(Note: can be

generalized beyond 1P

(DT of arbitrary f)

Page 14: Dynamic Programming (DP), Shortest Paths (SP)

Computing distance transforms

Depends on the distance measure (L1 or L2 distance) Linear time algorithms based on

dynamic programming Fast in practice

Can think of this as smoothing in feature space

Page 15: Dynamic Programming (DP), Shortest Paths (SP)

Distance transform applications Primarily used in recognition

Represent the model as a set of points Edges, or maybe corners

Compare model to image Under some transformation of the model

Chamfer matching: L1 distance on distance transform Not robust at all

Page 16: Dynamic Programming (DP), Shortest Paths (SP)

Hausdorff distance Defined between two sets of points

h(A,B)= if every point in A lies within of the nearest point in B is the smallest value for which this

holds

)),(),,(max(),(

minmax),(

ABhBAhBAH

baBAhBbAa

)(max),( xDTBAh BAa