c09ebf computes the inverse two-dimensional discrete wavelet transform (DWT) at a single level. The initialization routine c09abf must be called first to set up the DWT options.
The routine may be called by the names c09ebf or nagf_wav_dim2_sngl_inv.
3Description
c09ebf performs the inverse operation of routine c09eaf. That is, given sets of approximation, horizontal, vertical and diagonal coefficients computed by routine c09eaf using a DWT as set up by the initialization routine c09abf, on a real matrix, , c09ebf 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 routine c09abf.
2: – IntegerInput
On entry: number of columns, , of data matrix .
Constraint:
this must be the same as the value n passed to the initialization routine c09abf.
3: – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array ca
must be at least
where is the argument nwcn returned by routine c09abf.
On entry: contains the matrix of approximation coefficients, . This array will normally be the result of some transformation on the coefficients computed by routine c09eaf.
4: – IntegerInput
On entry: the first dimension of the array ca as declared in the (sub)program from which c09ebf is called.
Constraint:
where and , are returned by the initialization routine c09abf.
5: – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array ch
must be at least
where is the argument nwcn returned by routine c09abf.
On entry: contains the matrix of horizontal coefficients, . This array will normally be the result of some transformation on the coefficients computed by routine c09eaf.
6: – IntegerInput
On entry: the first dimension of the array ch as declared in the (sub)program from which c09ebf is called.
Constraint:
where and , are returned by the initialization routine c09abf.
7: – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array cv
must be at least
where is the argument nwcn returned by routine c09abf.
On entry: contains the matrix of vertical coefficients, . This array will normally be the result of some transformation on the coefficients computed by routine c09eaf.
8: – IntegerInput
On entry: the first dimension of the array cv as declared in the (sub)program from which c09ebf is called.
Constraint:
where and , are returned by the initialization routine c09abf.
9: – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array cd
must be at least
where is the argument nwcn returned by routine c09abf.
On entry: contains the matrix of diagonal coefficients, . This array will normally be the result of some transformation on the coefficients computed by routine c09eaf.
10: – IntegerInput
On entry: the first dimension of the array cd as declared in the (sub)program from which c09ebf is called.
Constraint:
where and , are returned by the initialization routine c09abf.
11: – Real (Kind=nag_wp) arrayOutput
On exit: the reconstructed matrix, , based on the input approximation, horizontal, vertical and diagonal coefficients and the transform options supplied to the initialization routine c09abf.
12: – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which c09ebf is called.
Constraint:
.
13: – Integer arrayCommunication Array
On entry: contains details of the discrete wavelet transform and the problem dimension as setup in the call to the initialization routine c09abf.
14: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
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, and .
Constraint: .
On entry, .
Constraint: , the value of m on initialization (see c09abf).
On entry, .
Constraint: , the value of n on initialization (see c09abf).
Either the initialization routine has not been called first or icomm has been corrupted.
Either the initialization routine was called with or icomm has been corrupted.
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL 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.
c09ebf 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 routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.