Wavelet Toolbox | ![]() ![]() |
Saving Information to Disk
Using specific file formats, the graphical tools let you save synthesized signals or images, as well as one- or two-dimensional wavelet packet decomposition structures. This feature provides flexibility and allows you to combine command line and graphical interface operations.
Saving Synthesized Signals
You can process a signal in the Wavelet Packet 1-D tool, and then save the processed signal to a MAT-file.
For example, load the demo analysis:
FileDemo Analysis
db1 - depth: 2 - ent: shannon --> sumsin
and perform a compression or de-noising operation on the original signal. When you close the Wavelet Packet 1-D De-noising or Wavelet Packet 1-D Compression window, update the synthesized signal by clicking Yes in the dialog box.
Then, from the Wavelet Packet 1-D tool, select the FileSave Synthesized Signal menu option.
A dialog box appears allowing you to select a directory and filename for the MAT-file. For this example, choose the name synthsig
.
To load the signal into your workspace, simply type:
load synthsig whos
|
|
|
|
|
|
|
|
|
|
|
|
valTHR |
1x1 |
|
|
wname |
1x3 |
|
|
The synthesized signal is given by synthsig
. In addition, the parameters of the de-noising or compression process are given by the wavelet name (wname
) and the global threshold (valTHR).
valTHR valTHR = 1.9961
Saving Synthesized Images
You can process an image in the Wavelet Packet 2-D tool, and then save the processed image to a MAT-file (with extension mat
or other).
For example, load the demo analysis:
FileDemo Analysis
db1 - depth: 1 - ent: shannon --> woman
and perform a compression on the original image. When you close the Wavelet Packet 2-D Compression window, update the synthesized image by clicking Yes in the dialog box that appears.
Then, from the Wavelet 2-D tool, select the FileSave Synthesized Image menu option.
A dialog box appears allowing you to select a directory and filename for the MAT-file. For this example, choose the name wpsymage
.
To load the image into your workspace, simply type:
load wpsymage whos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wname |
1x3 |
6 |
char array |
The synthesized image is given by X
. The variable map
contains the associated colormap. In addition, the parameters of the de-noising or compression process are given by the wavelet name (wname
) and the global threshold (valTHR
).
Saving One-Dimensional Decomposition Structures
The Wavelet Packet 1-D tool lets you save an entire wavelet packet decomposition tree and related data to your disk. The toolbox creates a MAT-file in the current directory with a name you choose, followed by the extension wp1
(wavelet packet 1-D).
Open the Wavelet Packet 1-D tool and load the demo analysis:
FileDemo Analysis
db1 - depth: 2 - ent: shannon --> sumsin
To save the data from this analysis, use the menu option FileSave Decomposition.
A dialog box appears that lets you specify a directory and file name for storing the decomposition data. Type the name wpdecex1d
.
After saving the decomposition data to the file wpdecex1d.wp1
, load the variables into your workspace.
loadwpdecex1d.wp1 -mat
whos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
valTHR |
0x0 |
0 |
|
The variable tree_struct
contains the wavelet packet tree structure. The variable data_name
contains the data name and valTHR
contains the global threshold, which is currently empty since the synthesized signal does not exist.
Saving Two-Dimensional Decomposition Structures
The file format, variables, and conventions are exactly the same as in the one-dimensional case except for the extension, which is wp2
(wavelet packet 2-D). The variables saved are the same as with the one-dimensional case, with the addition of the colormap matrix map
:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
valTHR |
1x1 |
8 |
|
Save options are also available when performing de-noising or compression inside the Wavelet Packet 1-D and Wavelet Packet 2-D tools.
In the Wavelet Packet De-noising windows, you can save the de-noised signal or image and the decomposition. The same holds true for the Wavelet Packet Compression windows.
This way, you can save directly many different trials from inside the De-noising and Compression windows without going back to the main Wavelet Packet windows during a fine-tuning process.
Note
When saving a synthesized signal (1-D), a synthesized image (2-D) or a
decomposition to a MAT-file, the extension of this file is free. The mat
extension is not necessary.
|
![]() | Importing and Exporting from Graphical Tools | Loading Information into the Graphical Tools | ![]() |