c09ebc computes the inverse two-dimensional discrete wavelet transform (DWT) at a single level. The initialization function c09abc must be called first to set up the DWT options.
The function may be called by the names: c09ebc, nag_wav_dim2_sngl_inv or nag_idwt_2d.
3Description
c09ebc performs the inverse operation of function c09eac. That is, given sets of approximation, horizontal, vertical and diagonal coefficients computed by function c09eac using a DWT as set up by the initialization function c09abc, on a real matrix, , c09ebc will reconstruct .
4References
None.
5Arguments
1: – IntegerInput
On entry: number of rows, , of data matrix .
Constraint:
this must be the same as the value m passed to the initialization function c09abc.
2: – IntegerInput
On entry: number of columns, , of data matrix .
Constraint:
this must be the same as the value n passed to the initialization function c09abc.
3: – const doubleInput
Note: the dimension, dim, of the array ca
must be at least
where is the argument nwcn returned by function c09abc.
The th element of the matrix is stored in .
On entry: contains the matrix of approximation coefficients, . This array will normally be the result of some transformation on the coefficients computed by function c09eac.
4: – IntegerInput
On entry: the stride separating matrix row elements in the array ca.
Constraint:
where and , are returned by the initialization function c09abc.
5: – const doubleInput
Note: the dimension, dim, of the array ch
must be at least
where is the argument nwcn returned by function c09abc.
The th element of the matrix is stored in .
On entry: contains the matrix of horizontal coefficients, . This array will normally be the result of some transformation on the coefficients computed by function c09eac.
6: – IntegerInput
On entry: the stride separating matrix row elements in the array ch.
Constraint:
where and , are returned by the initialization function c09abc.
7: – const doubleInput
Note: the dimension, dim, of the array cv
must be at least
where is the argument nwcn returned by function c09abc.
The th element of the matrix is stored in .
On entry: contains the matrix of vertical coefficients, . This array will normally be the result of some transformation on the coefficients computed by function c09eac.
8: – IntegerInput
On entry: the stride separating matrix row elements in the array cv.
Constraint:
where and , are returned by the initialization function c09abc.
9: – const doubleInput
Note: the dimension, dim, of the array cd
must be at least
where is the argument nwcn returned by function c09abc.
The th element of the matrix is stored in .
On entry: contains the matrix of diagonal coefficients, . This array will normally be the result of some transformation on the coefficients computed by function c09eac.
10: – IntegerInput
On entry: the stride separating matrix row elements in the array cd.
Constraint:
where and , are returned by the initialization function c09abc.
11: – doubleOutput
Note: the th element of the matrix is stored in .
On exit: the reconstructed matrix, , based on the input approximation, horizontal, vertical and diagonal coefficients and the transform options supplied to the initialization function c09abc.
12: – IntegerInput
On entry: the stride separating matrix row elements in the array b.
Constraint:
.
13: – const IntegerCommunication Array
On entry: contains details of the discrete wavelet transform and the problem dimension as setup in the call to the initialization function c09abc.
14: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_INITIALIZATION
Either the initialization function has not been called first or icomm has been corrupted.
Either the initialization function was called with or icomm has been corrupted.
NE_INT
On entry, .
Constraint: , the number of wavelet coefficients in the first dimension.
On entry, .
Constraint: , the number of wavelet coefficients in the first dimension.
On entry, .
Constraint: , the number of wavelet coefficients in the first dimension.
On entry, .
Constraint: , the number of wavelet coefficients in the first dimension.
On entry, .
Constraint: , the value of m on initialization (see c09abc).
On entry, .
Constraint: , the value of n on initialization (see c09abc).
NE_INT_2
On entry, and .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
7Accuracy
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.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
c09ebc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.