c09eac computes the two-dimensional discrete wavelet transform (DWT) at a single level. The initialization function
c09abc must be called first to set up the DWT options.
c09eac computes the two-dimensional DWT of a given input data array, considered as a matrix
, at a single level. For a chosen wavelet filter pair, the output coefficients are obtained by applying convolution and downsampling by two to the input,
, first over columns and then to the result over rows. The matrix of approximation (or smooth) coefficients,
, is produced by the low pass filter over columns and rows; the matrix of horizontal coefficients,
, is produced by the high pass filter over columns and the low pass filter over rows; the matrix of vertical coefficients,
, is produced by the low pass filter over columns and the high pass filter over rows; and the matrix of diagonal coefficients,
, is produced by the high pass filter over columns and rows. To reduce distortion effects at the ends of the data array, several end extension methods are commonly used. Those provided are: periodic or circular convolution end extension, half-point symmetric end extension, whole-point symmetric end extension and zero end extension. The total number,
, of coefficients computed for
,
,
, and
together and the number of columns of each coefficients matrix,
, are returned by the initialization function
c09abc. These values can be used to calculate the number of rows of each coefficients matrix,
, using the formula
.
-
1:
– Integer
Input
-
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:
– Integer
Input
-
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 double
Input
-
Note: the th element of the matrix is stored in .
On entry: the data matrix .
-
4:
– Integer
Input
-
On entry: the stride separating matrix row elements in the array
a.
Constraint:
.
-
5:
– double
Output
-
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 exit: contains the matrix of approximation coefficients, .
-
6:
– Integer
Input
-
On entry: the stride separating matrix row elements in the array
ca.
Constraint:
where
and
,
are returned by the initialization function
c09abc.
-
7:
– double
Output
-
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 exit: contains the matrix of horizontal coefficients, .
-
8:
– Integer
Input
-
On entry: the stride separating matrix row elements in the array
ch.
Constraint:
where
and
,
are returned by the initialization function
c09abc.
-
9:
– double
Output
-
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 exit: contains the matrix of vertical coefficients, .
-
10:
– Integer
Input
-
On entry: the stride separating matrix row elements in the array
cv.
Constraint:
where
and
,
are returned by the initialization function
c09abc.
-
11:
– double
Output
-
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 exit: contains the matrix of diagonal coefficients, .
-
12:
– Integer
Input
-
On entry: the stride separating matrix row elements in the array
cd.
Constraint:
where
and
,
are returned by the initialization function
c09abc.
-
13:
– Integer
Communication 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).
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.
Background information to multithreading can be found in the
Multithreading documentation.
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.
None.