93
Wavelet Transform
In the diagram of IDWT, the filters h 1 (n) and g 1 (n) are defined based on h(n) and
g(n) as follows:
h 1 ( )
n = −
( 1)
1−n h(1− n)
(5.15)
and
g n
( ) = h (2N 1 n)
(5.16)
1
1
− −
As can be seen, the structure and operations in IDWT are very similar to those of DWT,
and therefore, with some minor changes, the same codes written to calculate DWT can
be used to calculate IDWT.
An interesting feature of the DWT and IDWT is the possibility of reconstructing
the signal only based on a few of the levels (scales) of decomposition. For example,
if we want to extract only the main trend of the signal and ignore the medium and
fast variations, we can easily decompose the signal to several levels using DWT,
but use only the first (or first few) low-pass components to reconstruct the signal
using IDWT. This allows bypassing the medium- and high-frequency components.
Similarly, if the objective is to extract only the fast variations of signal, in the reconstruction phase, we can easily set the coefficients of the low frequency (high scales)
to zero while calculating the IDWT. This would eliminate the low-frequency trends
of the signal. Such approaches are very similar to low-pass and high-pass filtering
using DFT except that due to the advantages of the DWT mentioned at the beginning
of the chapter, DWT is often preferred over DFT.
The following example exhibits some of the DWT capabilities discussed earlier
when it is applied for biomedical signal processing.
Example 5.4
In this example, an EEG signal (described in Part II of this book) is decomposed
using the QMF method. First we use the “wavemenu” command in MATLAB ® to
activate the interactive wavelet toolbox in MATLAB. Then, on Wavelet Toolbox
Main Menu, under One-Dimensional, we select Wavelet 1-D. Now, on the
Wavelet 1-D, we load and read the EEG signal. In order to analyze the signal, several
options for the mother wavelet as well as decomposition levels are provided by
MATLAB. We select db3 wavelet and decompose the signal to the seventh levels.
Figure 5.11 shows the original signal, S (top graph), and reconstructed versions of
the signal at different levels for all seven levels.
As can be seen, the first reconstruction of the signal (i.e., the second signal
from the top) has only the low-frequency trend of the signal, while the last signal
captures only noise-like fast variations of the signal. If the signal is believed to be
corrupted by high-frequency noise, we can simply reconstruct the signal using
only the first few components to eliminate the high-frequency noise. For denoising
and filtering of the signal using DWT, more efficient techniques are often applied
that will be discussed later in this chapter.
Wavelet Transform
In the diagram of IDWT, the filters h 1 (n) and g 1 (n) are defined based on h(n) and
g(n) as follows:
h 1 ( )
n = −
( 1)
1−n h(1− n)
(5.15)
and
g n
( ) = h (2N 1 n)
(5.16)
1
1
− −
As can be seen, the structure and operations in IDWT are very similar to those of DWT,
and therefore, with some minor changes, the same codes written to calculate DWT can
be used to calculate IDWT.
An interesting feature of the DWT and IDWT is the possibility of reconstructing
the signal only based on a few of the levels (scales) of decomposition. For example,
if we want to extract only the main trend of the signal and ignore the medium and
fast variations, we can easily decompose the signal to several levels using DWT,
but use only the first (or first few) low-pass components to reconstruct the signal
using IDWT. This allows bypassing the medium- and high-frequency components.
Similarly, if the objective is to extract only the fast variations of signal, in the reconstruction phase, we can easily set the coefficients of the low frequency (high scales)
to zero while calculating the IDWT. This would eliminate the low-frequency trends
of the signal. Such approaches are very similar to low-pass and high-pass filtering
using DFT except that due to the advantages of the DWT mentioned at the beginning
of the chapter, DWT is often preferred over DFT.
The following example exhibits some of the DWT capabilities discussed earlier
when it is applied for biomedical signal processing.
Example 5.4
In this example, an EEG signal (described in Part II of this book) is decomposed
using the QMF method. First we use the “wavemenu” command in MATLAB ® to
activate the interactive wavelet toolbox in MATLAB. Then, on Wavelet Toolbox
Main Menu, under One-Dimensional, we select Wavelet 1-D. Now, on the
Wavelet 1-D, we load and read the EEG signal. In order to analyze the signal, several
options for the mother wavelet as well as decomposition levels are provided by
MATLAB. We select db3 wavelet and decompose the signal to the seventh levels.
Figure 5.11 shows the original signal, S (top graph), and reconstructed versions of
the signal at different levels for all seven levels.
As can be seen, the first reconstruction of the signal (i.e., the second signal
from the top) has only the low-frequency trend of the signal, while the last signal
captures only noise-like fast variations of the signal. If the signal is believed to be
corrupted by high-frequency noise, we can simply reconstruct the signal using
only the first few components to eliminate the high-frequency noise. For denoising
and filtering of the signal using DWT, more efficient techniques are often applied
that will be discussed later in this chapter.
