Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

WA Integer Wavelet Transform VI

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.

Details  Examples

Use the pull-down menu to select an instance of this VI.

WA 1D Integer Wavelet Transform

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.
0zero padding—Uses zeroes to pad the input data. Watch for abrupt transitions between the padded zeroes and the input data, which causes large artifacts near the transition.
1symmetric—Uses replications of the input data to pad the data, except that the VI left-flips the block at the input and right-flips the block at the end.
2periodic—Adds a replication of the input data block before and another replication after the input data block to pad the data.
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.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
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.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

WA 2D Integer Wavelet Transform

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.
0zero padding—Uses zeroes to pad the input data. Watch for abrupt transitions between the padded zeroes and the input data, which causes large artifacts near the transition.
1symmetric—Uses replications of the input data to pad the data, except that the VI left-flips the block at the input and right-flips the block at the end.
2periodic—Adds a replication of the input data block before and another replication after the input data block to pad the data.
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.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
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.
low_low contains coefficients that are a low-resolution approximation of the original 2D signal.
low_high contains the low_high coefficients. The high-frequency signal along the column direction influences the low_high coefficients.
high_low contains the high_low coefficients. The high-frequency signal along the row direction influences the high_low coefficients.
high_high contains the high_high coefficients. The high-frequency signal along the diagonal direction influences the high_high coefficients.
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.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

WA Integer Wavelet Transform Details

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.

References

  • Daubechies, I., and W. Sweldens. "Factoring wavelet transforms into lifting steps." Technical Report, Bell Laboratories, Lucent Technologies (1996).
  • Calderbank, R., I. Daubechies, W. Sweldens, and B. Yeo. "Wavelet transforms that map integers to integer." Applied and Computational Harmonic Analysis 5, no. 3 (1998): 332-369.

Examples

Refer to the following VIs for examples of using the WA Integer Wavelet Transform VI:

  • Lossless Medical Image Compression VI: labview\examples\Wavelet Analysis\WAApplications.llb
  • Integer Wavelet Transform on Image VI: labview\examples\Wavelet Analysis\WAGettingStarted.llb
  • Integer Wavelet Transform on 1D Signal VI: labview\examples\Wavelet Analysis\WAGettingStarted.llb

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit