dynamic programming (dp), shortest paths (sp)
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 PresentationTRANSCRIPT
![Page 1: Dynamic Programming (DP), Shortest Paths (SP)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/1.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/2.jpg)
),(0 yxuz t
Level sets
),(1 yxuz t
[Donald Tanguay]
![Page 3: Dynamic Programming (DP), Shortest Paths (SP)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/3.jpg)
Level sets and curve evolution
uVt
uVNCt
u
udiv
u
uN
![Page 4: Dynamic Programming (DP), Shortest Paths (SP)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/4.jpg)
Shortest path problem
A
Z
Lecture
theme
![Page 5: Dynamic Programming (DP), Shortest Paths (SP)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/5.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/6.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/7.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/8.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/9.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/10.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/11.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/12.jpg)
),(...),(),(),...,,( 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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/13.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/14.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/15.jpg)
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)](https://reader035.vdocuments.us/reader035/viewer/2022062315/56814deb550346895dbb5b8b/html5/thumbnails/16.jpg)
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