PR 06 · Match shape despite timing changes
AdvancedPR 06 · Template Matching and Structured RecognitionInteractive plot
Description
Warp a signal in time and inspect a dynamic time warping cost matrix and its optimal alignment path.
Try this: Increase the time warp with a zero-width band, then widen the band. What does the lower cost allow the alignment to ignore?
Hints
The chapter section that uses this lab:
Lab · PR 06 · Match shape despite timing changes
- Aligned total cost
- 0.231
- Same-index total cost
- 3.591
- Path cells
- 14
Dark cells have larger amplitude mismatch; gray cells are forbidden by the band. The path minimizes accumulated allowed cost. A wider band cannot raise the optimum but can permit implausible repetitions.
Try this: Increase the time warp with a zero-width band, then widen the band. What does the lower cost allow the alignment to ignore?
Two twelve-sample sine signals: a(t)=sin(2πt), b(t)=sin(2πt^w). Local cost is squared amplitude difference. The path must start and finish at both endpoints; only diagonal, vertical and horizontal forward steps are allowed. Cost is a sum, not normalized by path length.