# 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.

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 ${\displaystyle V_{J}}$; in theory by computing the scalar products

${\displaystyle s_{n}^{(J)}:=2^{J}\langle f(t),\phi (2^{J}t-n)\rangle ,}$

where ${\displaystyle \phi }$ 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

${\displaystyle P_{J}[f](x):=\sum _{n\in \mathbb {Z} }s_{n}^{(J)}\,\phi (2^{J}x-n)}$

is the orthogonal projection or at least some good approximation of the original signal in ${\displaystyle V_{J}}$.

The MRA is characterised by its scaling sequence

${\displaystyle a=(a_{-N},\dots ,a_{0},\dots ,a_{N})}$ or, as Z-transform, ${\displaystyle a(z)=\sum _{n=-N}^{N}a_{n}z^{-n}}$

and its wavelet sequence

${\displaystyle b=(b_{-N},\dots ,b_{0},\dots ,b_{N})}$ or ${\displaystyle b(z)=\sum _{n=-N}^{N}b_{n}z^{-n}}$

(some coefficients might be zero). Those allow to compute the wavelet coefficients ${\displaystyle d_{n}^{(k)}}$, 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 ${\displaystyle s^{(J)}}$.

## Forward DWT

One computes recursively, starting with the coefficient sequence ${\displaystyle s^{(J)}}$ and counting down from k=J-1 to some M<J,

single application of a wavelet filter bank, with filters g=a*, h=b*
${\displaystyle s_{n}^{(k)}:={\frac {1}{2}}\sum _{m=-N}^{N}a_{m}s_{2n+m}^{(k+1)}}$ or ${\displaystyle s^{(k)}(z):=(\downarrow 2)(a^{*}(z)\cdot s^{(k+1)}(z))}$

and

${\displaystyle d_{n}^{(k)}:={\frac {1}{2}}\sum _{m=-N}^{N}b_{m}s_{2n+m}^{(k+1)}}$ or ${\displaystyle d^{(k)}(z):=(\downarrow 2)(b^{*}(z)\cdot s^{(k+1)}(z))}$,

for k=J-1,J-2,...,M and all ${\displaystyle n\in \mathbb {Z} }$. In the Z-transform notation:

recursive application of the filter bank
• The downsampling operator ${\displaystyle (\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, ${\displaystyle (\downarrow 2)(c(z))=\sum _{k\in \mathbb {Z} }c_{2k}z^{-k}}$.
• The starred Laurent-polynomial ${\displaystyle a^{*}(z)}$ denotes the adjoint filter, it has time-reversed adjoint coefficients, ${\displaystyle 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

${\displaystyle P_{k}[f](x):=\sum _{n\in \mathbb {Z} }s_{n}^{(k)}\,\phi (2^{k}x-n)}$

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

${\displaystyle 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

${\displaystyle D_{k}[f](x):=\sum _{n\in \mathbb {Z} }d_{n}^{(k)}\,\psi (2^{k}x-n)}$,

with ${\displaystyle \psi }$ denoting the mother wavelet of the wavelet transform.

## Inverse DWT

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

${\displaystyle s_{n}^{(k+1)}:=\sum _{k=-N}^{N}a_{k}s_{2n-k}^{(k)}+\sum _{k=-N}^{N}b_{k}d_{2n-k}^{(k)}}$ or ${\displaystyle 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 ${\displaystyle n\in \mathbb {Z} }$. In the Z-transform notation:

• The upsampling operator ${\displaystyle (\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 ${\displaystyle (\uparrow 2)(c(z)):=\sum _{n\in \mathbb {Z} }c_{n}z^{-2n}}$. This linear operator is, in the Hilbert space ${\displaystyle \ell ^{2}(\mathbb {Z} ,\mathbb {R} )}$, the adjoint to the downsampling operator ${\displaystyle (\downarrow 2)}$.

## References

• A.N. Akansu Multiplierless Suboptimal PR-QMF Design Proc. SPIE 1818, Visual Communications and Image Processing, p. 723, November, 1992
• A.N. Akansu Multiplierless 2-band Perfect Reconstruction Quadrature Mirror Filter (PR-QMF) Banks US Patent 5,420,891, 1995
• A.N. Akansu Multiplierless PR Quadrature Mirror Filters for Subband Image Coding IEEE Trans. Image Processing, p. 1359, September 1996
• M.J. Mohlenkamp, M.C. Pereyra Wavelets, Their Friends, and What They Can Do for You (2008 EMS) p. 38
• B.B. Hubbard The World According to Wavelets: The Story of a Mathematical Technique in the Making (1998 Peters) p. 184
• S.G. Mallat A Wavelet Tour of Signal Processing (1999 Academic Press) p. 255
• A. Teolis Computational Signal Processing with Wavelets (1998 Birkhäuser) p. 116
• Y. Nievergelt Wavelets Made Easy (1999 Springer) p. 95