nag_wfilt_2d (c09abc) returns the details of the chosen two-dimensional discrete wavelet filter. For a chosen mother wavelet, discrete wavelet transform type (single-level or multi-level DWT) and end extension method, this function returns the maximum number of levels of resolution (appropriate to a multi-level transform), the filter length, the total number of approximation, horizontal, vertical and diagonal coefficients and the number of coefficients in the second dimension for the single-level case. This function must be called before any of the two-dimensional transform functions in this chapter.
Two-dimensional discrete wavelet transforms (DWT) are characterised by the mother wavelet, the end extension method and whether multiresolution analysis is to be performed. For the selected combination of choices for these three characteristics, and for given dimensions (
) of data matrix
, nag_wfilt_2d (c09abc) returns the dimension details for the transform determined by this combination. The dimension details are:
, the maximum number of levels of resolution that would be computed were a multi-level DWT applied;
, the filter length;
the total number of approximation, horizontal, vertical and diagonal coefficients (over all levels in the multi-level DWT case); and
, the number of coefficients in the second dimension for a single-level DWT. These values are also stored in the communication array icomm
, as are the input choices, so that they may be conveniently communicated to the two-dimensional transform functions in this chapter.
wavnam – Nag_WaveletInput
: the name of the mother wavelet. See the c09 Chapter Introduction
- Haar wavelet.
- , where
- Daubechies wavelet with vanishing moments ( coefficients). For example, is the name for the Daubechies wavelet with vanishing moments ( coefficients).
- , where can be one of 1_1, 1_3, 1_5, 2_2, 2_4, 2_6, 2_8, 3_1, 3_3, 3_5 or 3_7
- Biorthogonal wavelet of order .. For example is the name for the Biorthogonal wavelet of order .
, , , , , , , , , , , , , , , , , , , or .
wtrans – Nag_WaveletTransformInput
: the type of discrete wavelet transform that is to be applied.
- Single-level decomposition or reconstruction by discrete wavelet transform.
- Multiresolution, by a multi-level DWT or its inverse.
mode – Nag_WaveletModeInput
: the end extension method.
- Periodic end extension.
- Half-point symmetric end extension.
- Whole-point symmetric end extension.
- Zero end extension.
, , or .
m – IntegerInput
On entry: the number of elements, , in the first dimension (number of rows of data matrix ) of the input data.
n – IntegerInput
On entry: the number of elements, , in the second dimension (number of columns of data matrix ) of the input data.
nwlmax – Integer *Output
: the maximum number of levels of resolution,
, that can be computed if a multi-level discrete wavelet transform is applied (
). It is such that
is not set.
nf – Integer *Output
On exit: the filter length, , for the supplied mother wavelet. This is used to determine the number of coefficients to be generated by the chosen transform.
nwct – Integer *Output
On exit: the total number of wavelet coefficients, , that will be generated. When the number of rows required in each of the output coefficient matrices can be calculated as . When the length of the array used to store all of the coefficient matrices must be at least .
nwcn – Integer *Output
On exit: for a single-level transform (), the number of coefficients that would be generated in the second dimension, , for each coefficient type. For a multi-level transform () this is set to .
icomm – IntegerCommunication Array
On exit: contains details of the wavelet transform and the problem dimension which is to be communicated to the two-dimensional discrete transform functions in this chapter.
fail – NagError *Input/Output
The NAG error argument (see Section 3.6
in the Essential Introduction).