Main Content

Wavelet Analyzer

(Removed) Analyze signals and images using wavelets

The Wavelet Analyzer app has been removed. For alternatives, see Version History.

Description

The Wavelet Analyzer app is an interactive tool for using wavelets to visualize and analyze signals and images. With the app, you can:

  • Perform wavelet and wavelet packet analysis

  • Denoise and compress signals and images

  • Estimate density and regression

  • Perform matching pursuit analysis

  • Perform image fusion

Wavelet Analyzer app

Open the Wavelet Analyzer App

  • MATLAB® Toolstrip: On the Apps tab, under Signal Processing and Communications, click the app icon.

  • MATLAB command prompt: Enter waveletAnalyzer.

Examples

expand all

In this example, you analyze and denoise an electrical consumption signal. You also learn how to import and export information from the app to disk and your workspace.

To start the 1-D Wavelet Analysis Tool, first start Wavelet Analyzer.

waveletAnalyzer

The Wavelet Analyzer appears.

Click the Wavelet 1-D menu item. The discrete wavelet analysis tool for 1-D signal data appears.

Load a signal.

load leleccum

In the Wavelet 1-D tool, select File > Import from Workspace. When the Import from Workspace dialog box appears, select the leleccum variable. Click OK to import the electrical consumption signal.

Perform a single-level wavelet decomposition.

To start the analysis, first perform a single-level decomposition using the db1 wavelet.

In the upper right portion of the Wavelet 1-D tool, select the db1 wavelet and single-level decomposition.

Click the Analyze button.

After a pause for computation, the tool displays the decomposition.

Zoom in on relevant detail.

Drag a rubber band box (by holding down the left mouse button) over the portion of the signal you want to magnify. Here, we have selected the noisy part of the original signal.

Click the X+ button (located at the bottom of the screen) to zoom horizontally.

The Wavelet 1-D tool zooms all the displayed signals.

The other zoom controls do more or less what you would expect them to. The X- button, for example, zooms out horizontally. The history function keeps track of all your views of the signal. Return to a previous zoom level by clicking the left arrow button.

Perform a multilevel decomposition.

To perform a level 3 decomposition of the signal using the db1 wavelet, select 3 from the Level menu at the upper right, and then click the Analyze button again.

After the decomposition is performed, you see a new analysis appear in the Wavelet 1-D tool.

Selecting Different Views of the Decomposition

The Display mode menu (middle right) lets you choose different views of the wavelet decomposition.

The default display mode is called “Full Decomposition Mode.” Other alternatives include:

  • Separate Mode,” which shows the details and the approximations in separate columns.

  • Superimpose Mode,” which shows the details on a single plot superimposed in different colors. The approximations are plotted similarly.

  • Tree Mode,” which shows the decomposition tree, the original signal, and one additional component of your choice. Click on the decomposition tree to select the signal component you'd like to view.

  • Show and Scroll Mode,” which displays three windows. The first shows the original signal superimposed on an approximation you select. The second window shows a detail you select. The third window shows the wavelet coefficients.

  • “Show and Scroll Mode (Stem Cfs)” is very similar to the “Show and Scroll Mode” except that it displays, in the third window, the wavelet coefficients as stem plots instead of colored blocks.

You can change the default display mode on a per-session basis. Select the desired mode from the View > Default Display Mode submenu.

Note

The Compression and Denoising windows opened from the Wavelet 1-D tool will inherit the current coefficient visualization attribute (stems or colored blocks).

Depending on which display mode you select, you may have access to additional display options through the More Display Options button.

These options include the ability to suppress the display of various components, and to choose whether or not to display the original signal along with the details and approximations.

Remove noise from a signal.

The Wavelet Analyzer app features a denoising option with a predefined thresholding strategy. This makes it very easy to remove noise from a signal.

Note

The denoising option is no longer recommended. Use Wavelet Signal Denoiser instead.

Bring up the denoising tool: click the denoise button, located in the middle right of the window, underneath the Analyze button.

The Wavelet 1-D Denoising window appears.

While a number of options are available for fine-tuning the denoising algorithm, accept the defaults of soft fixed form thresholding and unscaled white noise. The Unscaled white noise option corresponds to setting the multiplicative threshold input argument SCAL of wden to 'one'. Choosing Scaled white noise corresponds to 'sln', and Non-white noise corresponds to 'mln'. For more information, see wden.

Continue by clicking the denoise button.

The denoised signal appears superimposed on the original. The tool also plots the wavelet coefficients of both signals. The original detail coefficients appear on the left side of the display. In order to time align decomposition levels across all scales, wavelet coefficients are replicated at each scale to account for the missing time points. Therefore, as the scale becomes coarser, the coefficients assume a staircase-like appearance.

Zoom in on the plot of the original and denoised signals for a closer look.

Drag a rubber band box around the pertinent area, and then click the XY+ button.

The denoise window magnifies your view. By default, the original signal is shown in red, and the denoised signal in yellow.

Dismiss the Wavelet 1-D Denoising window: click the Close button.

You cannot have the denoise and Compression windows open simultaneously, so close the Wavelet 1-D Denoising window to continue. When the Update Synthesized Signal dialog box appears, click No. If you click Yes, the Synthesized Signal is then available in the Wavelet 1-D main window.

Refine the analysis.

The graphical tools make it easy to refine an analysis any time you want to. Up to now, you have looked at a level 3 analysis using db1. Refine the analysis of the electrical consumption signal by using the db3 wavelet at level 5.

Select 5 from the Level menu at the upper right, and select the db3 from the Wavelet menu. Click the Analyze button.

Compress the signal.

The graphical interface tools feature a compression option with automatic or manual thresholding.

Bring up the Compression window: click the Compress button, located in the middle right of the window, underneath the Analyze button.

The Compression window appears.

While you always have the option of choosing by level thresholding, here you will take advantage of the global thresholding feature for quick and easy compression.

Note

If you want to experiment with manual thresholding, choose the By Level thresholding option from the menu located at the top right of the Wavelet 1-D Compression window. The sliders located below this menu then control the level-dependent thresholds, indicated by yellow dotted lines running horizontally through the graphs on the left of the window. The yellow dotted lines can also be dragged directly using the left mouse button.

Click the Compress button, located at the center right.

After a pause for computation, the electrical consumption signal is redisplayed in red with the compressed version superimposed in yellow. Below, we have zoomed in to get a closer look at the noisy part of the signal.

You can see that the compression process removed most of the noise, but preserved 99.99% of the energy of the signal.

From the Wavelet 1-D Compression tool, click the Residuals button. The More on Residuals for Wavelet 1-D Compression window appears.

Displayed statistics include measures of tendency (mean, mode, median) and dispersion (range, standard deviation). In addition, the tool provides frequency-distribution diagrams (histograms and cumulative histograms), as well as time-series diagrams: autocorrelation function and spectrum. The same feature exists for the Wavelet 1-D Denoising tool.

Dismiss the Wavelet 1-D Compression window: click the Close button. When the Update Synthesized Signal dialog box appears, click No.

Show statistics.

You can view a variety of statistics about your signal and its components.

From the Wavelet 1-D tool, click the Statistics button.

The Wavelet 1-D Statistics window appears displaying by default statistics on the original signal.

Select the synthesized signal or signal component whose statistics you want to examine. Click the appropriate option button, and then click the Show Statistics button. Here, we have chosen to examine the synthesized signal using 100 bins instead of 30, which is the default:

Displayed statistics include measures of tendency (mean, mode, median) and dispersion (range, standard deviation).

In addition, the tool provides frequency-distribution diagrams (histograms and cumulative histograms). You can plot these histograms separately using the Histograms button from the Wavelets 1-D window.

Click the Approximation option button. A menu appears from which you choose the level of the approximation you want to examine.

Select Level 1 and again click the Show Statistics button. Statistics appear for the level 1 approximation.

More About

expand all

Version History

Introduced before R2006a

expand all

R2023b: Removed

The Wavelet Analyzer app has been removed.