c09cc computes the one-dimensional multi-level discrete wavelet transform (DWT). The initialization method C09 Communication class constructor must be called first to set up the DWT options.
Public Shared Sub c09cc ( _ n As Integer, _ x As Double(), _ c As Double(), _ dwtlev As Integer(), _ communications As C09..::..C09Communications, _ <OutAttribute> ByRef ifail As Integer _ )
public: static void c09cc( int n, array<double>^ x, array<double>^ c, array<int>^ dwtlev, C09..::..C09Communications^ communications, [OutAttribute] int% ifail )
- Type: System..::..Int32On entry: the number of elements, , in the data array .
- Type: array<System..::..Double>()An array of size [n]On entry: x contains the one-dimensional input dataset , for .
- Type: array<System..::..Double>()An array of size [lenc]On exit: let denote the number of coefficients (of each type) produced by the wavelet transform at level , for . These values are returned in dwtlev. Setting and , for , the coefficients are stored as follows:
- , for
- Contains the level approximation coefficients, .
- , for
- Contains the level detail coefficients .
- , for
- Contains the level detail coefficients, for .
- Type: array<System..::..Int32>()An array of size On exit: the number of transform coefficients at each level. and contain the number, , of approximation and detail coefficients respectively, for the final level of resolution (these are equal); contains the number of detail coefficients, , for the ()th level, for .
- Type: NagLibrary..::..C09..::..C09CommunicationsAn Object of type C09.c09ccCommunications.
c09cc computes the multi-level DWT of one-dimensional data. For a given wavelet and end extension method, c09cc will compute a multi-level transform of a data array, , for , using a specified number, , of levels. The number of levels specified, , must be no more than the value returned in nwlmax by the initialization method C09 Communication class constructor for the given problem. The transform is returned as a set of coefficients for the different levels (packed into a single array) and a representation of the multi-level structure.
The notation used here assigns level to the input dataset, , with level being the first set of coefficients computed, with the detail coefficients, , being stored while the approximation coefficients, , are used as the input to a repeat of the wavelet transform. This process is continued until, at level , both the detail coefficients, , and the approximation coefficients, are retained. The output array, , stores these sets of coefficients in reverse order, starting with followed by .
Errors or warnings detected by the method:
On entry, lenc is set too small: .
On entry, .
Constraint: .On entry, nwl is larger than the maximum number of levels returned by the initialization method: , maximum .
Either the initialization method has not been called first or array icomm has been corrupted.Either the initialization method was called with or array icomm has been corrupted.
Dynamic memory allocation failed.
The accuracy of the wavelet transform depends only on the floating-point operations used in the convolution and downsampling and should thus be close to machine precision.
The wavelet coefficients at each level can be extracted from the output array c using the information contained in dwtlev on exit (see the descriptions of c and dwtlev in [Parameters]). For example, given an input data set, , denoising can be carried out by applying a thresholding operation to the detail coefficients at every level. The elements , for , as described in [Parameters], contain the detail coefficients, , for and , where and is the transformed noise term. If some threshold parameter is chosen, a simple hard thresholding rule can be applied as
taking to be an approximation to the required detail coefficient without noise, . The resulting coefficients can then be used as input to c09cd in order to reconstruct the denoised signal.
See the references given in the introduction to this chapter for a more complete account of wavelet denoising and other applications.