SLIDE 14 Snake energy: pair-wise interactions
2 1 2 1 1
| ) , ( | | ) , ( | ) , , , , , (
i i y n i i i x n n total
y x G y x G y y x x E
∑
− = − −
+ − = K K
2 1 1 2 1
) ( ) (
i i n i i i
y y x x − + − ⋅ +
+ − = +
∑
α
∑
− = −
− =
1 2 1
|| ) ( || ) , , (
n i i n total
G E ν ν ν K
∑
− = + −
⋅ +
1 2 1
|| ||
n i i i
ν ν α
∑
− = + −
=
2 1 1
) , ( ) , , (
n i i i i n total
E E ν ν ν ν K
2 1 2 1
|| || || ) ( || ) , (
+ +
− + − =
i i i i i i
G E ν ν α ν ν ν
where
… … … …
1
v
2
v
3
v
4
v
6
v
5
v
control points Energy E is minimized via Dynamic Programming
) , ( ... ) , ( ) , ( ) ,..., , (
1 1 3 2 2 2 1 1 2 1 n n n n
v v E v v E v v E v v v E
− −
+ + + =
First-order interactions (elasticity)
DP Snakes [Amini, Weymouth, Jain, 1990] DP Snakes [Amini, Weymouth, Jain, 1990]
2
v
3
v
4
v
6
v
5
v
control points
Iterate until optimal position for each point is the center of the box, i.e. the snake is optimal in the local search space constrained by boxes
Energy E is minimized via Dynamic Programming
) , ( ... ) , ( ) , ( ) ,..., , (
1 1 3 2 2 2 1 1 2 1 n n n n
v v E v v E v v E v v v E
− −
+ + + =
First-order interactions (elasticity) 1
v
DP Viterbi Algorithm
- Reuse solutions to subproblems
- Introduce intermediate variables
: lowest total energy for the first k-1 vertices of the snake for a given value of vk determine
- ptimal position
- f predecessor,
for each possible position of self
) , ( 4
4 n
v v E ) , (
4 3 3
v v E ) 3 (
3
E ) 4 (
3
E ) 4 (
4
E ) 3 (
4
E ) 2 (
4
E ) 1 (
4
E ) 4 (
n
E ) 3 (
n
E ) 2 (
n
E ) 1 (
n
E ) 2 (
3
E ) 1 (
3
E ) 4 (
2
E ) 3 (
2
E
DP Viterbi Algorithm
) , ( ... ) , ( ) , (
1 1 3 2 2 2 1 1 n n n
v v E v v E v v E
− −
+ + +
) , (
3 2 2
v v E ) 1 (
2
E ) 2 (
2
E ) , (
2 1 1
v v E
) (
2
nm O
Complexity:
) 1 (
1
= E ) 2 (
1
= E ) 3 (
1
= E ) 4 (
1
= E
Considering first-order interactions (elasticity), one minimization iteration
states 1 2 … m sites
1
v
2
v
3
v
4
v
n
v
- vs. brute force search ____?
Dynamic Programming for a closed snake?
) , ( ... ) , ( ) , (
1 1 3 2 2 2 1 1 n n n
v v E v v E v v E
− −
+ + +
DP can be applied to optimize an open ended snake What about “looped” energy, in the case of a closed snake?
1
ν
n
ν
) , ( ) , ( ... ) , ( ) , (
1 1 1 3 2 2 2 1 1
v v E v v E v v E v v E
n n n n n
+ + + +
− −
1
ν
n
ν
2
ν
1 − n
ν
3
ν
4
ν