Fast wavelet transform

The fast wavelet transform is a mathematical algorithm designed to turn a waveform or signal in the time domain into a sequence of coefficients based on an orthogonal basis of small finite waves, or wavelets. The transform can be easily extended to multidimensional signals, such as images, where the time domain is replaced with the space domain. This algorithm was introduced in 1989 by Stéphane Mallat.

It has as theoretical foundation the device of a finitely generated, orthogonal multiresolution analysis (MRA). In the terms given there, one selects a sampling scale J with sampling rate of 2J per unit interval, and projects the given signal f onto the space $$V_J$$; in theory by computing the scalar products


 * $$s^{(J)}_n:=2^J \langle f(t),\varphi(2^J t-n) \rangle,$$

where $$\varphi$$ is the scaling function of the chosen wavelet transform; in practice by any suitable sampling procedure under the condition that the signal is highly oversampled, so
 * $$ P_J[f](x):=\sum_{n\in\Z} s^{(J)}_n\,\varphi(2^Jx-n)$$

is the orthogonal projection or at least some good approximation of the original signal in $$V_J$$.

The MRA is characterised by its scaling sequence


 * $$a=(a_{-N},\dots,a_0,\dots,a_N)$$ or, as Z-transform, $$a(z)=\sum_{n=-N}^Na_nz^{-n}$$

and its wavelet sequence


 * $$b=(b_{-N},\dots,b_0,\dots,b_N)$$ or $$b(z)=\sum_{n=-N}^Nb_nz^{-n}$$

(some coefficients might be zero). Those allow to compute the wavelet coefficients $$d^{(k)}_n$$, at least some range k=M,...,J-1, without having to approximate the integrals in the corresponding scalar products. Instead, one can directly, with the help of convolution and decimation operators, compute those coefficients from the first approximation $$s^{(J)}$$.

Forward DWT
For the discrete wavelet transform (DWT), one computes recursively, starting with the coefficient sequence $$s^{(J)}$$ and counting down from k = J - 1 to some M < J,



s^{(k)}_n:=\frac12 \sum_{m=-N}^N a_m s^{(k+1)}_{2n+m} $$ or $$ s^{(k)}(z):=(\downarrow 2)(a^*(z)\cdot s^{(k+1)}(z)) $$ and

d^{(k)}_n:=\frac12 \sum_{m=-N}^N b_m s^{(k+1)}_{2n+m} $$ or $$ d^{(k)}(z):=(\downarrow 2)(b^*(z)\cdot s^{(k+1)}(z)) $$,

for k=J-1,J-2,...,M and all $$n\in\Z$$. In the Z-transform notation:
 * The downsampling operator $$(\downarrow 2)$$ reduces an infinite sequence, given by its Z-transform, which is simply a Laurent series, to the sequence of the coefficients with even indices, $$(\downarrow 2)(c(z))=\sum_{k\in\Z}c_{2k}z^{-k}$$.
 * The starred Laurent-polynomial $$a^*(z)$$ denotes the adjoint filter, it has time-reversed adjoint coefficients, $$a^*(z)=\sum_{n=-N}^N a_{-n}^*z^{-n}$$. (The adjoint of a real number being the number itself, of a complex number its conjugate, of a real matrix the transposed matrix, of a complex matrix its hermitian adjoint).
 * Multiplication is polynomial multiplication, which is equivalent to the convolution of the coefficient sequences.

It follows that


 * $$P_k[f](x):=\sum_{n\in\Z} s^{(k)}_n\,\varphi(2^kx-n)$$

is the orthogonal projection of the original signal f or at least of the first approximation $$P_J[f](x)$$ onto the subspace $$V_k$$, that is, with sampling rate of 2k per unit interval. The difference to the first approximation is given by


 * $$P_J[f](x)=P_k[f](x)+D_k[f](x)+\dots+D_{J-1}[f](x), $$

where the difference or detail signals are computed from the detail coefficients as


 * $$D_k[f](x):=\sum_{n\in\Z} d^{(k)}_n\,\psi(2^kx-n), $$

with $$\psi$$ denoting the mother wavelet of the wavelet transform.

Inverse DWT
Given the coefficient sequence $$s^{(M)}$$ for some M < J and all the difference sequences $$d^{(k)}$$, k = M,...,J − 1, one computes recursively

s^{(k+1)}_n:=\sum_{k=-N}^N a_k s^{(k)}_{2n-k}+\sum_{k=-N}^N b_k d^{(k)}_{2n-k} $$ or $$ s^{(k+1)}(z)=a(z)\cdot(\uparrow 2)(s^{(k)}(z))+b(z)\cdot(\uparrow 2)(d^{(k)}(z)) $$ for k = J − 1,J − 2,...,M and all $$n\in\Z$$. In the Z-transform notation:
 * The upsampling operator $$(\uparrow 2)$$ creates zero-filled holes inside a given sequence. That is, every second element of the resulting sequence is an element of the given sequence, every other second element is zero or $$(\uparrow 2)(c(z)):=\sum_{n\in\Z}c_nz^{-2n}$$. This linear operator is, in the Hilbert space $$\ell^2(\Z,\R)$$, the adjoint to the downsampling operator $$(\downarrow 2)$$.