Post on 19-Jan-2016
description
transcript
Dynamic Programming (DP),Shortest Paths (SP)
CS664 Lecture 22Thursday 11/11/04
Some slides care of Yuri Boykov, Dan Huttenlocher
),(0 yxuz t
Level sets
),(1 yxuz t
[Donald Tanguay]
Level sets and curve evolution
uVt
uVNCt
u
udiv
u
uN
Shortest path problem
A
Z
Lecture
theme
Dijkstra algorithm
A
B
- processed nodes (distance to A is known)- active nodes (front)
- active node with the smallest distance value
Graph edges are “cheap” in places with high intensity gradients
Example:
Shortest paths segmentation
1
23
4
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.
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)(
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
Discrete snake energy
Best location of the last vertex vn depends only the location of vn-1
1v2v
3v
4v6v
5v
),(...),(),(),...,,( 1132221121 nnnn vvEvvEvvEvvvE First-order interactions
control points
Discrete snakes example
Fold data term into smoothness term
),(...),(),(),...,,( 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
Distance transform (DT)
yxxDTPy
P min)(
Py
xyxxDT
P
Py
P
,01
)(1min)(Note: can be
generalized beyond 1P
(DT of arbitrary f)
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
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
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