Deterministic
Pattern Recogniser
Allows timescale variations in sequences for same class

D(T,N)=t,imint∈1..Ti∈1..N∑d(t,i)- d(t,i) is distance between features from t-th frame of test to i-th frame of template
D(t,i)=min[D(t,i−1),D(t−1,i−1),D(t−1,i)]+d(t,i)- Allowing transition from current and previous frame only
- Recursive

Problems
- How much flexibility to allow?
- How to penalise warping?
- How to determine a fair distance metric?
- How many templates to register?
Basic Algorithm
- Initialise the cumulative distances for t=1
D(1,i)={d(1,i)D(1,i−1)+d(1,i)for i=1,for i=2,...,N
- Recur for t=2,...,T
D(t,i)={D(t−1,i)+d(t,i)min[D(t,i−1),D(t−1,i−1),D(t−1,i)]+d(t,i)for i=1,for i=2,...,N
- Finalise, the cumulative distance up to the final point gives the total cost of the match: D(T,N)

Distortion Penalty
- Initialise the cumulative distances for t=1
D(1,i)={d(1,i)d(1,i)+D(1,i−1)+dVfor i=1,for i=2,...,N
- Recur for t=2,...,T
D(t,i)={d(t,i)+D(t−1,i1)+dHmin[d(t,i)+D(t,i−1)+dV,2d(t,i)+D(t−1,i−1),d(t,i)+D(t−1,i)+dH]for i=1,for i=2,...,N
- Where dV and dH are costs associated with vertical and horizontal transitions respectively
- Finalise, the cumulative distance up to the final point gives the total cost of the match: D(T,N)
- Allows weighting for dynamic penalties when moving horizontally or vertically

Store Best Path
- Initialise distances and traceback indicator for t=1
D(1,i)={d(1,i)d(1,i)+D(1,i−1)for i=1,for i=2,...,N
ϕ(1,i)={[0,0][1,i−1]for i=1,for i=2,...,N
- Recur for cumulative distances at t=2,...,T
D(1,i)={d(t,i)+D(t−1,i)d(t,i)+min[D(t,i−1),D(t−1,i−1),D(t−1,i)]for i=1,for i=2,...,N
ϕ(1,i)={[t−1,i]argmin[D(t,i−1),D(t−1,i−1),D(t−1,i)]for i=1,for i=2,...,N
- Final point gives the total alignment cost D(T,N) and the end coordinates of the best path zK=[T,N], where K is the number of nodes on the optimal path
- Trace the path back for k=K−1,...,1,zk=ϕ(zk+1), and Z={z1,...,zK}

- Vary allowable movements through grid
- Second row for blocking multiple of the same movements in succession
Search Pruning
- Speed up algorithm for real-time
- Kill bad options
Gross Partitioning

- Too far from diagonal
- Probably wrong or bad
Score Pruning

- Examine existing branches
- See which scores are really bad