naginterfaces.library.wav.dim2_​sngl_​fwd

naginterfaces.library.wav.dim2_sngl_fwd(a, comm)[source]

dim2_sngl_fwd computes the two-dimensional discrete wavelet transform (DWT) at a single level. The initialization function dim2_init() must be called first to set up the DWT options.

For full information please refer to the NAG Library document for c09ea

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/c09/c09eaf.html

Parameters
afloat, array-like, shape

The data matrix .

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by a prior call to dim2_init().

Returns
cafloat, ndarray, shape

Contains the matrix of approximation coefficients, .

chfloat, ndarray, shape

Contains the matrix of horizontal coefficients, .

cvfloat, ndarray, shape

Contains the matrix of vertical coefficients, .

cdfloat, ndarray, shape

Contains the matrix of diagonal coefficients, .

Raises
NagValueError
(errno )

On entry, .

Constraint: , the value of on initialization (see dim2_init()).

(errno )

On entry, .

Constraint: , the value of on initialization (see dim2_init()).

(errno )

Either the initialization function has not been called first or [‘icomm’] has been corrupted.

(errno )

Either the initialization function was called with or [‘icomm’] has been corrupted.

Notes

dim2_sngl_fwd 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 dim2_init(). These values can be used to calculate the number of rows of each coefficients matrix, , using the formula .

References

Daubechies, I, 1992, Ten Lectures on Wavelets, SIAM, Philadelphia