Owning Palette: Discrete Wavelet VIs
Installed With: Advanced Signal Processing Toolkit
Uses the lifting scheme to compute the multi-level integer wavelet transform (IWT) of signal. This VI returns the approximation coefficients at the largest level and the detail coefficients at all levels for a 1D signal input and returns the approximation coefficients and the detail coefficients at all levels for a 2D signal input. 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.

![]() |
extension specifies the method to use to pad data at the borders of the input signal. The default is periodic. 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 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 integer wavelet analysis. The default is Haar. Options include Haar, bior2_2, and FBI. If you use another type of wavelet, the VI uses the default value automatically. | ||||||
![]() |
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.
| ||||||
![]() |
IWT coef contains the approximation coefficients and the detail coefficients from the multi-level integer wavelet transform. The VI concatenates the coefficients into a 1D integer 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 periodic. 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 integer wavelet analysis. The default is Haar. Options include Haar, bior2_2, and FBI. If you use another type of wavelet, the VI uses the default value automatically. | ||||||||
![]() |
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.
| ||||||||
![]() |
IWT coef contains the approximation coefficients and the detail coefficients from the multi-level integer wavelet transform. Each element of the array includes the approximation coefficients and the detail coefficients at a level. Each element of the array contains the 2D IWT results of one level. The ith element stores the approximation coefficients and the detail coefficients at level i+1.
| ||||||||
![]() |
2D IWT plot contains the approximation coefficients at the largest level and the detail coefficients at all levels. IWT plot is the same size as signal. | ||||||||
![]() |
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.
|
Similarly to the discrete wavelet transform, the VI applies the integer wavelet transform to the signal and then to the approximation coefficients of each level recursively.
On each level, the VI implements the integer wavelet transform with the lifting scheme. The following illustration shows a flowchart of a one-level integer wavelet transform with the lifting scheme:

al is the approximation coefficients of level l. al+1 and dl+1 are the approximation coefficients and the details coefficients of level l+1. The lifting scheme is an iterative procedure. The number of the iteration, M, depends on the wavelet type. At the first iteration, al splits into a set of even-indexed elements and a set of odd-indexed elements. The VI uses the set of even-indexed elements of the approximation coefficients of level l, al, 2k, as the initial approximation coefficients of level l+1,
. The VI uses the set of odd-indexed elements of the approximation coefficients of level l, al, 2k+1, as the initial detail coefficients of level l+1,
. The VI then iteratively passes the initial approximation coefficients and the initial detail coefficients through the lifting filter, P(m)(z), and the dual lifting filter, U(m)(z), to obtain the approximation coefficients and the detail coefficients as shown in the following equations:


where m indicates the index of iteration, k is the coefficient index, n is the total number of coefficients, I is the number of taps of the lifting filters, and
is the operator to truncate x to the largest integer that is no greater than x. The VI computes M, P(m)(z), and U(m)(z) automatically according to the wavelet type you select.
The inverse integer wavelet transform is a reverse operation of the integer wavelet transform. The following illustration shows a flowchart of a one-level inverse integer wavelet transform:

Because IWT coefficients are integers, you do not need to quantize the coefficients in the process of compression, and you do not encounter the quantization error. Therefore, the integer wavelet transform and the inverse integer wavelet transform are used widely in lossless signal or image compression applications.
Refer to the following VIs for examples of using the WA Integer Wavelet Transform VI: