Owning Palette: Discrete Wavelet VIs
Installed With: Advanced Signal Processing Toolkit
Computes the multi-level discrete wavelet transform (DWT) of signal. This VI returns the approximation coefficients at the largest level and the detail coefficients at all levels for a 1D signal input. This VI returns the approximation coefficients and the detail coefficients at all levels for a 2D signal input. This VI computes the discrete wavelet transform at each level by using the lowpass analysis filters, the highpass analysis filters, and a decimation factor of 2. Wire data to the signal input to determine the polymorphic instance to use or manually select the instance.
Use the pull-down menu to select an instance of this VI.
c.gif)
![]() |
extension specifies the method to use to pad data at the borders of the input signal. The default is symmetric. The extension length is equal to the length of the wavelet filters. When you select the extension method, make the transition between the input signal and the padded data as smooth as possible because a smooth transition generates fewer large detail coefficients and enhances the efficiency of the signal representation.
|
||||||
![]() |
signal specifies the input signal. | ||||||
![]() |
levels specifies the number of levels in the discrete wavelet analysis. levels must be a positive integer no greater than log2(Ls), where Ls is the length of the 1D signal or the minimum dimensional size of the 2D signal. The default is –1, which indicates that the VI sets levels as the largest integer no greater than log2(Ls). | ||||||
![]() |
wavelet specifies the wavelet type to use for the discrete wavelet analysis. The default is db02. The options include two types: orthogonal (Haar, Daubechies (dbxx), Coiflets (coifx), Symmlets (symx)) and biorthogonal (FBI, Biorthogonal (biorx_x)), where x indicates the order of the wavelet. The higher the order, the smoother the wavelet. The orthogonal wavelets are not redundant and are suitable for signal or image denoising and compression. The biorthogonal wavelets usually have the linear phase property and are suitable for signal or image feature extraction. If you want to use other types of wavelets, do not wire this input. Instead, use the Wavelet Design Express VI to design the wavelet you want and wire the resulting analysis filters to the analysis filters input. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
analysis filters specifies the coefficients of the lowpass analysis filters and the highpass analysis filters for the wavelet you specify. If you specify a value for analysis filters, the VI ignores the settings in the wavelet input. You can use the Wavelet Design Express VI to design the analysis filters and the corresponding synthesis filters.
| ||||||
![]() |
DWT coef contains the approximation coefficients and the detail coefficients from the multi-level discrete wavelet decomposition. The VI concatenates the coefficients into a waveform starting with the approximation coefficients at the largest level followed by the detail coefficients at all levels in descending order. | ||||||
![]() |
length returns, in a 1D array, the number of approximation and detail coefficients at each level. At a decomposition level of N, length is equal to N+2. The first element of length always is equal to the number of approximation coefficients. The last element of length indicates the total number of raw data samples. The length of the detail coefficients is arranged in descending order. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|
c.gif)
![]() |
extension specifies the method to use to pad data at the borders of the input signal. The default is symmetric. The extension length is equal to the length of the wavelet filters. When you select the extension method, make the transition between the input signal and the padded data as smooth as possible because a smooth transition generates fewer large detail coefficients and enhances the efficiency of the signal representation.
|
||||||
![]() |
signal specifies the input signal. | ||||||
![]() |
levels specifies the number of levels in the discrete wavelet analysis. levels must be a positive integer no greater than log2(Ls), where Ls is the length of the 1D signal or the minimum dimensional size of the 2D signal. The default is –1, which indicates that the VI sets levels as the largest integer no greater than log2(Ls). | ||||||
![]() |
wavelet specifies the wavelet type to use for the discrete wavelet analysis. The default is db02. The options include two types: orthogonal (Haar, Daubechies (dbxx), Coiflets (coifx), Symmlets (symx)) and biorthogonal (FBI, Biorthogonal (biorx_x)), where x indicates the order of the wavelet. The higher the order, the smoother the wavelet. The orthogonal wavelets are not redundant and are suitable for signal or image denoising and compression. The biorthogonal wavelets usually have the linear phase property and are suitable for signal or image feature extraction. If you want to use other types of wavelets, do not wire this input. Instead, use the Wavelet Design Express VI to design the wavelet you want and wire the resulting analysis filters to the analysis filters input. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
analysis filters specifies the coefficients of the lowpass analysis filters and the highpass analysis filters for the wavelet you specify. If you specify a value for analysis filters, the VI ignores the settings in the wavelet input. You can use the Wavelet Design Express VI to design the analysis filters and the corresponding synthesis filters.
| ||||||
![]() |
DWT coef contains the approximation coefficients and the detail coefficients from the multi-level discrete wavelet decomposition. The VI concatenates the coefficients into a array starting with the approximation coefficients at the largest level followed by the detail coefficients at all levels in descending order. | ||||||
![]() |
length returns, in a 1D array, the number of approximation and detail coefficients at each level. At a decomposition level of N, length is equal to N+2. The first element of length always is equal to the number of approximation coefficients. The last element of length indicates the total number of raw data samples. The length of the detail coefficients is arranged in descending order. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|

![]() |
extension specifies the method to use to pad data at the borders of the input signal. The default is symmetric. The extension length is equal to the length of the wavelet filters. When you select the extension method, make the transition between the input signal and the padded data as smooth as possible because a smooth transition generates fewer large detail coefficients and enhances the efficiency of the signal representation.
|
||||||||
![]() |
signal is the 2D input signal. | ||||||||
![]() |
levels specifies the number of levels in the discrete wavelet analysis. levels must be a positive integer no greater than log2(Ls), where Ls is the length of the 1D signal or the minimum dimensional size of the 2D signal. The default is –1, which indicates that the VI sets levels as the largest integer no greater than log2(Ls). | ||||||||
![]() |
wavelet specifies the wavelet type to use for the discrete wavelet analysis. The default is db02. The options include two types: orthogonal (Haar, Daubechies (dbxx), Coiflets (coifx), Symmlets (symx)) and biorthogonal (FBI, Biorthogonal (biorx_x)), where x indicates the order of the wavelet. The higher the order, the smoother the wavelet. The orthogonal wavelets are not redundant and are suitable for signal or image denoising and compression. The biorthogonal wavelets usually have the linear phase property and are suitable for signal or image feature extraction. If you want to use other types of wavelets, do not wire this input. Instead, use the Wavelet Design Express VI to design the wavelet you want and wire the resulting analysis filters to the analysis filters input. | ||||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||||
![]() |
analysis filters specifies the coefficients of the lowpass analysis filters and the highpass analysis filters for the wavelet you specify. If you specify a value for analysis filters, the VI ignores the settings in the wavelet input. You can use the Wavelet Design Express VI to design the analysis filters and the corresponding synthesis filters.
| ||||||||
![]() |
DWT coef contains the approximation coefficients and the detail coefficients from the multi-level discrete wavelet transform. Each element of the array contains the 2D DWT results of one level. The ith element stores the approximation coefficients and the detail coefficients at level i+1.
| ||||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|
The following illustration shows an example of a three-level discrete wavelet decomposition, where you set the levels input of this VI to 3. The length of the input signal is 16 points.

G1(z) denotes that the signal passes through a highpass filter. G0(z) denotes that the signal passes through a lowpass filter. G1(z) and G0(z) form the analysis filter bank.
denotes a decimation on the signal with a factor of 2.
Using information in the previous illustration, you can see that the DWT coef output contains the approximation coefficients of the largest level and the details coefficients of each level. You also can see that the length output of this VI contains the following elements, where the last element is the length of the input signal:

You easily can extend the 1D discrete wavelet decomposition and reconstruction to 2D signal processing. At each level, the VI implements the 1D discrete wavelet transform on each row signal. Then, the VI applies the 1D discrete wavelet transform to each column of the preceding output. The VI implements the inverse transform with the reverse operation. The following illustration shows the filter bank implementation for a 2D discrete wavelet transform.

low_low is the approximation of the input 2D signal at a larger scale. low_high, high_low, and high_high correspond to the detail information along the column, row, and diagonal directions.
The following illustrations show an image fed into the 2D discrete wavelet transform and the resulting DWT coef.


Notice that the maxima (white points) and the minima (black points) of low_high are located around the column edges, the maxima and the minima of high_low are near the row edges, and the maxima and the minima of high_high are near the diagonal edges. Refer to A Wavelet Tour of Signal Processing for more information about the discrete wavelet transform.
Refer to the following VIs for examples of using the WA Discrete Wavelet Transform VI: