Wavelet Toolbox |
Example 4: Building a Wavelet Tree Object (EDWTTREE)
This example creates a new class of objects: EDWTTREE.
We define an -DWT tree class starting from the class DTREE and overloading the methods merge
, plot
, recons
, and split
.
For more information on the -DWT, see the section e-Decimated DWT.
The plot
method shows how to add Node Labels, Node Actions, and Tree Actions.
You can have a look at the example in the ex1_edwt
M-file located in the toolbox/wavelet/wavedemo
directory. This program can be used directly, but it is also useful to learn how to build new object-oriented programming functions.
The definition of the new class is described below.
Class EDWTTREE (parent class: DTREE)
Fields
dtree |
Parent object |
dwtMode |
DWT extension mode |
wavInfo |
Structure (wavelet information) |
Fields Description
wavName |
- Wavelet Name |
Lo_D |
- Low Decomposition filter |
Hi_D |
- High Decomposition filter |
Lo_R |
- Low Reconstruction filter |
Hi_R |
- High Reconstruction filter |
Methods
Running This Example
The following figure is obtained using the example ex1_edwt
, selecting the De-noise option in the Tree Action menu and clicking the node 0.
The approximations are labeled in yellow and the details are labeled in red. The last nodes cannot be split.
The title of the figure contains the DWT extension mode used ('sym'
in the present example) and the name of the de-noising method.
Example 3: Building a Wavelet Tree Object (WVTREE) |
© 1994-2005 The MathWorks, Inc.