Documentation |
This section takes you through the features of one-dimensional selection of wavelet coefficients using one of the Wavelet Toolbox™ specialized tools. The toolbox provides a graphical interface tool to explore some reconstruction schemes based on various wavelet coefficients selection strategies:
Global selection of biggest coefficients (in absolute value)
By level selection of biggest coefficients
Automatic selection of biggest coefficients
Manual selection of coefficients
For this section, switch the extension mode to symmetric padding using the command
dwtmode('sym')
Start the Wavelet Coefficients Selection 1-D Tool.
From the MATLAB^{®} prompt, type
wavemenu
The Wavelet Toolbox Main Menu appears.
Click the Wavelet Coefficients Selection 1-D menu item. The discrete wavelet coefficients selection tool for one-dimensional signals appears.
From the File menu, choose the Load Signal option.
When the Load Signal dialog box appears, select the MAT-file noisbump.mat, which should reside in the MATLAB folder toolbox/wavelet/wavedemo. Click the OK button. The noisy bumps data is loaded into the Wavelet Coefficients Selection 1-D tool.
Perform a Wavelet Decomposition.
Select the db3 wavelet from the Wavelet menu and select 6 from the Level menu, and then click the Analyze button.
The tool displays below the original signal (on the left) its wavelet decomposition: the approximation coefficients A6 and detail coefficients from D6 at the top to D1 at the bottom. In the middle of the window, below the synthesized signal (which at this step is the same, since all the wavelet coefficients are kept) it displays the selected coefficients.
Selecting Biggest Coefficients Globally
On the right of the window, find a column labeled Kept. The last line shows the total number of coefficients: 1049. This is a little bit more than the number of observations, which is 1024. You can choose the number of selected biggest coefficients by typing a number instead of 1049 or by using the slider. Type 40 and press Enter. The numbers of selected biggest coefficients level by level are updated (but cannot be modified since Global is the current selection method). Then click the Apply button. The resulting coefficients are now displayed.
In the previous trial, the approximation coefficients were all kept. It is possible to relax this constraint by selecting another option from the App. cfs menu (Approximation Coefficients abbreviation). Choose the Unselect option and click the Apply button.
None of the approximation coefficients are kept.
From the App. cfs menu, select the Selectable option. Type 80 for the number of selected biggest coefficients and press Enter. Then, click the Apply button.
Some of the approximation coefficients (15) have been kept.
Selecting Biggest Coefficients by Level
From the Define Selection method menu, select the By Level option. You can choose the number of selected biggest coefficients by level or select it using the sliders. Type 4 for the approximation and each detail, and then click the Apply button.
Selecting Coefficients Manually
From the Define Selection method menu, select the Manual option. The tool displays on the left part, below the original signal, its wavelet decomposition. At the beginning, no coefficients are kept so no selected coefficient is visible and the synthesized signal is null.
Select 16 coefficients individually by double clicking each of them using the left mouse button. The color of selected coefficients switches from green to yellow for the details and from blue to yellow for the approximation, which appear on the left of the window and appear in yellow on the middle part. Click the Apply button.
You can deselect the currently selected coefficients by double clicking each of them. Another way to select or deselect a set of coefficients is to use the selection box. Drag a rubber band box (hold down the left mouse button) over a portion of the coefficient axes (original or selected) containing all the currently selected coefficients. Click the Unselect button located on the right of the window. Click the Apply button. The tool displays the null signal again.
Note that when the coefficients are very close, it is easier to zoom in before selecting or deselecting them.
Drag a rubber band box over the portion of the coefficient axes around the position 800 and containing all scales and click the Select button. Click the Apply button.
This illustrates that wavelet analysis is a local analysis since the signal is perfectly reconstructed around the position 800. Check the Show Original Signal to magnify it.
Selecting Coefficients Automatically
From the Define Selection method menu, select the Stepwise movie option. The tool displays the same initial window as in the manual selection mode, except for the left part of it.
Let's perform the stepwise movie using the k biggest coefficients, from k = 1 to k = 31 in steps of 1, click the Start button. As soon as the result is satisfactory, click the Stop button.
The tool lets you save the synthesized signal to disk. The toolbox creates a MAT-file in the current folder with a name you choose.
To save the synthesized signal from the present selection, use the menu option File > Save Synthesized Signal. A dialog box appears that lets you specify a folder and filename for storing the signal and the wavelet name.
At the end of this section, turn back the extension mode to zero padding using the command
dwtmode('zpd')