Wavelet transform



In mathematics, a wavelet series is a representation of a square-integrable (real- or complex-valued) function by a certain orthonormal series generated by a wavelet. This article provides a formal, mathematical definition of an orthonormal wavelet and of the integral wavelet transform.

Definition
A function $$ \psi \,\in\, L^2(\mathbb{R})$$ is called an orthonormal wavelet if it can be used to define a Hilbert basis, that is a complete orthonormal system, for the Hilbert space $$ L^2\left(\mathbb{R}\right)$$ of square integrable functions.

The Hilbert basis is constructed as the family of functions $$ \{\psi_{jk}:\, j,\, k \,\in\, \Z\}$$ by means of dyadic translations and dilations of $$ \psi\,$$,
 * $$\psi_{jk}(x) = 2^\frac{j}{2} \psi\left(2^jx - k\right)\,$$

for integers $$ j,\, k \,\in\, \mathbb{Z}$$.

If under the standard inner product on $$ L^2\left(\mathbb{R}\right)$$,
 * $$\langle f, g\rangle = \int_{-\infty}^\infty f(x)\overline{g(x)}dx$$

this family is orthonormal, it is an orthonormal system:
 * $$\begin{align}

\langle\psi_{jk},\psi_{lm}\rangle &= \int_{-\infty}^\infty \psi_{jk}(x)\overline{\psi_{lm}(x)}dx \\ &=\delta_{jl}\delta_{km} \end{align}$$

where $$ \delta_{jl}\,$$ is the Kronecker delta.

Completeness is satisfied if every function $$ f \,\in\, L^2\left(\mathbb{R}\right)$$ may be expanded in the basis as
 * $$f(x) = \sum_{j, k=-\infty}^\infty c_{jk} \psi_{jk}(x)$$

with convergence of the series understood to be convergence in norm. Such a representation of f is known as a wavelet series. This implies that an orthonormal wavelet is self-dual.

The integral wavelet transform is the integral transform defined as


 * $$\left[W_\psi f\right](a, b) = \frac{1}{\sqrt{|a|}} \int_{-\infty}^\infty \overline{\psi\left(\frac{x-b}{a}\right)}f(x)dx\,$$

The wavelet coefficients $$ c_{jk}$$ are then given by


 * $$c_{jk} = \left[W_\psi f\right]\left(2^{-j}, k2^{-j}\right)$$

Here, $$ a = 2^{-j}$$ is called the binary dilation or dyadic dilation, and $$ b = k2^{-j}$$ is the binary or dyadic position.

Principle
The fundamental idea of wavelet transforms is that the transformation should allow only changes in time extension, but not shape, imposing a restriction on choosing suitable basis functions. Changes in the time extension are expected to conform to the corresponding analysis frequency of the basis function. Based on the uncertainty principle of signal processing,


 * $$\Delta t \Delta \omega \geq \frac{1}{2}$$

where $$ t $$ represents time and $$ \omega $$ angular frequency ($$\omega=2 \pi f $$, where $$ f$$ is ordinary frequency).

The higher the required resolution in time, the lower the resolution in frequency has to be. The larger the extension of the analysis windows is chosen, the larger is the value of $$ \Delta t$$.



When $$ \Delta t $$ is large,
 * 1) Bad time resolution
 * 2) Good frequency resolution
 * 3) Low frequency, large scaling factor

When $$ \Delta t $$ is small
 * 1) Good time resolution
 * 2) Bad frequency resolution
 * 3) High frequency, small scaling factor

In other words, the basis function $$ \psi $$ can be regarded as an impulse response of a system with which the function $$ x(t) $$ has been filtered. The transformed signal provides information about the time and the frequency. Therefore, wavelet-transformation contains information similar to the short-time-Fourier-transformation, but with additional special properties of the wavelets, which show up at the resolution in time at higher analysis frequencies of the basis function. The difference in time resolution at ascending frequencies for the Fourier transform and the wavelet transform is shown below. Note however, that the frequency resolution is decreasing for increasing frequencies while the temporal resolution increases. This consequence of the Fourier uncertainty principle is not correctly displayed in the Figure.



This shows that wavelet transformation is good in time resolution of high frequencies, while for slowly varying functions, the frequency resolution is remarkable.

Another example: The analysis of three superposed sinusoidal signals $$ y(t) \;=\; \sin(2 \pi f_0 t) \;+\; \sin(4 \pi f_0 t) \;+\; \sin(8 \pi f_0 t)$$ with STFT and wavelet-transformation.



Wavelet compression
Wavelet compression is a form of data compression well suited for image compression (sometimes also video compression and audio compression). Notable implementations are JPEG 2000, DjVu and ECW for still images, JPEG XS, CineForm, and the BBC's Dirac. The goal is to store image data in as little space as possible in a file. Wavelet compression can be either lossless or lossy.

Using a wavelet transform, the wavelet compression methods are adequate for representing transients, such as percussion sounds in audio, or high-frequency components in two-dimensional images, for example an image of stars on a night sky. This means that the transient elements of a data signal can be represented by a smaller amount of information than would be the case if some other transform, such as the more widespread discrete cosine transform, had been used.

Discrete wavelet transform has been successfully applied for the compression of electrocardiograph (ECG) signals In this work, the high correlation between the corresponding wavelet coefficients of signals of successive cardiac cycles is utilized employing linear prediction. Wavelet compression is not effective for all kinds of data. Wavelet compression handles transient signals well. But smooth, periodic signals are better compressed using other methods, particularly traditional harmonic analysis in the frequency domain with Fourier-related transforms. Compressing data that has both transient and periodic characteristics may be done with hybrid techniques that use wavelets along with traditional harmonic analysis. For example, the Vorbis audio codec primarily uses the modified discrete cosine transform to compress audio (which is generally smooth and periodic), however allows the addition of a hybrid wavelet filter bank for improved reproduction of transients.

See Diary Of An x264 Developer: The problems with wavelets (2010) for discussion of practical issues of current methods using wavelets for video compression.

Method
First a wavelet transform is applied. This produces as many coefficients as there are pixels in the image (i.e., there is no compression yet since it is only a transform). These coefficients can then be compressed more easily because the information is statistically concentrated in just a few coefficients. This principle is called transform coding. After that, the coefficients are quantized and the quantized values are entropy encoded and/or run length encoded.

A few 1D and 2D applications of wavelet compression use a technique called "wavelet footprints".

Requirement for image compression
For most natural images, the spectrum density of lower frequency is higher. As a result, information of the low frequency signal (reference signal) is generally preserved, while the information in the detail signal is discarded. From the perspective of image compression and reconstruction, a wavelet should meet the following criteria while performing image compression:


 * Being able to transform more original image into the reference signal.
 * Highest fidelity reconstruction based on the reference signal.
 * Should not lead to artifacts in the image reconstructed from the reference signal alone.

Requirement for shift variance and ringing behavior
Wavelet image compression system involves filters and decimation, so it can be described as a linear shift-variant system. A typical wavelet transformation diagram is displayed below:



The transformation system contains two analysis filters (a low pass filter $$h_0(n)$$ and a high pass filter $$h_1(n)$$), a decimation process, an interpolation process, and two synthesis filters ($$g_0(n)$$ and $$g_1(n)$$). The compression and reconstruction system generally involves low frequency components, which is the analysis filters $$h_0(n)$$ for image compression and the synthesis filters $$g_0(n)$$ for reconstruction. To evaluate such system, we can input an impulse $$\delta(n-n_i)$$ and observe its reconstruction $$h(n-n_i)$$; The optimal wavelet are those who bring minimum shift variance and sidelobe to $$h(n-n_i)$$. Even though wavelet with strict shift variance is not realistic, it is possible to select wavelet with only slight shift variance. For example, we can compare the shift variance of two filters: By observing the impulse responses of the two filters, we can conclude that the second filter is less sensitive to the input location (i.e. it is less shift variant).

Another important issue for image compression and reconstruction is the system's oscillatory behavior, which might lead to severe undesired artifacts in the reconstructed image. To achieve this, the wavelet filters should have a large peak to sidelobe ratio.

So far we have discussed about one-dimension transformation of the image compression system. This issue can be extended to two dimension, while a more general term - shiftable multiscale transforms - is proposed.

Derivation of impulse response
As mentioned earlier, impulse response can be used to evaluate the image compression/reconstruction system.

For the input sequence $$x(n)=\delta(n-n_i)$$, the reference signal $$r_1(n)$$ after one level of decomposition is $$x(n)*h_0(n)$$ goes through decimation by a factor of two, while $$h_0(n)$$ is a low pass filter. Similarly, the next reference signal $$r_2(n)$$ is obtained by $$r_1(n)*h_0(n)$$ goes through decimation by a factor of two. After L levels of decomposition (and decimation), the analysis response is obtained by retaining one out of every $$2^L$$ samples: $$h_A^{(L)}(n,n_i)=f_{h0}^{(L)}(n-n_i/2^L)$$.

On the other hand, to reconstruct the signal x(n), we can consider a reference signal $$r_L(n)=\delta(n-n_j)$$. If the detail signals $$d_i(n)$$ are equal to zero for $$1\leq i \leq L$$, then the reference signal at the previous stage ($$L-1$$ stage) is $$r_{L-1}(n)=g_0(n-2n_j)$$, which is obtained by interpolating $$r_L(n)$$ and convoluting with $$g_0(n)$$. Similarly, the procedure is iterated to obtain the reference signal $$r(n)$$ at stage $$L-2, L-3, ...., 1$$. After L iterations, the synthesis impulse response is calculated: $$h_s^{(L)}(n,n_i)=f_{g0}^{(L)}(n/2^L-n_j)$$, which relates the reference signal $$r_L(n)$$ and the reconstructed signal.

To obtain the overall L level analysis/synthesis system, the analysis and synthesis responses are combined as below:

$$h_{AS}^{(L)}(n,n_i)=\sum_{k} f_{h0}^{(L)}(k-n_i/2^L)f_{g0}^{(L)}(n/2^L-k)$$.

Finally, the peak to first sidelobe ratio and the average second sidelobe of the overall impulse response $$h_{AS}^{(L)}(n,n_i)$$ can be used to evaluate the wavelet image compression performance.

Comparison with Fourier transform and time-frequency analysis
Wavelets have some slight benefits over Fourier transforms in reducing computations when examining specific frequencies. However, they are rarely more sensitive, and indeed, the common Morlet wavelet is mathematically identical to a short-time Fourier transform using a Gaussian window function. The exception is when searching for signals of a known, non-sinusoidal shape (e.g., heartbeats); in that case, using matched wavelets can outperform standard STFT/Morlet analyses.

Other practical applications
The wavelet transform can provide us with the frequency of the signals and the time associated to those frequencies, making it very convenient for its application in numerous fields. For instance, signal processing of accelerations for gait analysis, for fault detection, for the analysis of seasonal displacements of landslides, for design of low power pacemakers and also in ultra-wideband (UWB) wireless communications.

1. Discretizing of the $c-\tau$ axis

Applied the following discretization of frequency and time:
 * $\begin{align}

c_n &= c_0^n \\ \tau_m &= m \cdot T \cdot c_0^n \end{align}$

Leading to wavelets of the form, the discrete formula for the basis wavelet:
 * $\Psi(k, n, m) = \frac{1}{\sqrt{c_0^n}}\cdot\Psi\left[\frac{k - m c_0^n}{c_0^n}T\right] = \frac{1}{\sqrt{c_0^n}}\cdot\Psi\left[\left(\frac{k}{c_0^n} - m\right)T\right]$

Such discrete wavelets can be used for the transformation:
 * $Y_{DW}(n, m) = \frac{1}{\sqrt{c_0^n}}\cdot\sum_{k=0}^{K - 1} y(k)\cdot\Psi\left[\left(\frac{k}{c_0^n} - m\right)T\right]$|Implementation via the FFT (fast Fourier transform)

As apparent from wavelet-transformation representation (shown below)
 * $Y_W(c, \tau) = \frac{1}{\sqrt{c}}\cdot\int_{-\infty}^{\infty} y(t) \cdot \Psi\left(\frac{t - \tau}{c}\right)\, dt $

where $ c $ is scaling factor, $ \tau $ represents time shift factor

and as already mentioned in this context, the wavelet-transformation corresponds to a convolution of a function $y(t) $ and a wavelet-function. A convolution can be implemented as a multiplication in the frequency domain. With this the following approach of implementation results into:
 * Fourier-transformation of signal $y(k) $ with the FFT
 * Selection of a discrete scaling factor $c_n$
 * Scaling of the wavelet-basis-function by this factor $c_n$ and subsequent FFT of this function
 * Multiplication with the transformed signal YFFT of the first step
 * Inverse transformation of the product into the time domain results in $Y_W(c, \tau)$ for different discrete values of $ \tau $ and a discrete value of $c_n$
 * Back to the second step, until all discrete scaling values for $c_n$are processed

There are many different types of wavelet transforms for specific purposes. See also a full list of wavelet-related transforms but the common ones are listed below: Mexican hat wavelet, Haar Wavelet, Daubechies wavelet, triangular wavelet.|Fault detection in electrical power systems. |Locally adaptive statistical estimation of functions whose smoothness varies substantially over the domain, or more specifically, estimation of functions that are sparse in the wavelet domain.
 * undefined

Time-causal wavelets
For processing temporal signals in real time, it is essential that the wavelet filters do not access signal values from the future as well as that minimal temporal latencies can be obtained. Time-causal wavelets representations have been developed by Szu et al and Lindeberg, with the latter method also involving a memory-efficient time-recursive implementation.

Synchro-squeezed transform
Synchro-squeezed transform can significantly enhance temporal and frequency resolution of time-frequency representation obtained using conventional wavelet transform.