Dynamic time warping is an algorithm for measuring similarity between two
sequences which may vary in time or speed. DTW has been applied to video,
audio, and graphics - indeed, any data which can be turned into a linear
representation can be analyzed with DTW. A well known application has been
automatic speech recognition, to cope with different speaking speeds.
In general, DTW is a method that allows a computer to find an optimal
match between two given sequences (e.g. time series) with certain
restrictions. The sequences are "warped" non-linearly in the time dimension
to determine a measure of their similarity independent of certain non-linear
variations in the time dimension. This sequence alignment method is often
used in the context of hidden Markov models.
One example of the restrictions imposed on the matching of the sequences
is on the monotonicity of the mapping in the time dimension. Continuity
is less important in DTW than in other pattern matching algorithms;
DTW is an algorithm particularly suited to matching sequences with
missing information, provided there are long enough segments for matching
to occur.
The optimization process is performed using dynamic programming, hence the name.
The extension of the problem for two-dimensional "series" like images
(planar warping) is NP-complete, while the problem for one-dimensional
signals like time series can be solved in polynomial time.