naginterfaces.library.wav.dim3_sngl_fwd¶
- naginterfaces.library.wav.dim3_sngl_fwd(a, comm)[source]¶
dim3_sngl_fwd
computes the three-dimensional discrete wavelet transform (DWT) at a single level. The initialization functiondim3_init()
must be called first to set up the DWT options.For full information please refer to the NAG Library document for c09fa
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/c09/c09faf.html
- Parameters
- afloat, array-like, shape
The three-dimensional input data , where is stored in .
- commdict, communication object, modified in place
Communication structure.
This argument must have been initialized by a prior call to
dim3_init()
.
- Returns
- cfloat, ndarray, shape
The coefficients of the discrete wavelet transform. If you need to access or modify the approximation coefficients or any specific set of detail coefficients then the use of
dim3_coeff_ext()
ordim3_coeff_ins()
is recommended. For completeness the following description provides details of precisely how the coefficients are stored in but this information should only be required in rare cases.The sets of coefficients are stored in the following order: approximation coefficients (LLL) first, followed by sets of detail coefficients: LLH, LHL, LHH, HLL, HLH, HHL, HHH, where L indicates the low pass filter, and H the high pass filter being applied to, respectively, the columns of length , the rows of length and then the frames of length .
Note that for computational efficiency reasons each set of coefficients is stored in the order (see output arguments , and in
dim3_init()
).
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: , the value of on initialization (see
dim3_init()
).- (errno )
On entry, .
Constraint: , the value of on initialization (see
dim3_init()
).- (errno )
On entry, .
Constraint: , the value of on initialization (see
dim3_init()
).- (errno )
Either the communication array [‘icomm’] has been corrupted or there has not been a prior call to the initialization function
dim3_init()
.- (errno )
Either the communication array [‘icomm’] has been corrupted or was used in the prior call to the initialization function
dim3_init()
.
- Notes
dim3_sngl_fwd
computes the three-dimensional DWT of some given three-dimensional input data, considered as a number of two-dimensional frames, 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 data, , first over columns, next over rows and finally across frames. The three-dimensional approximation coefficients are produced by the low pass filter over columns, rows and frames. In addition there are sets of three-dimensional detail coefficients, each corresponding to a different order of low pass and high pass filters (see the C09 Introduction). All coefficients are packed into a single array. 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 is returned by the initialization functiondim3_init()
.
- References
Daubechies, I, 1992, Ten Lectures on Wavelets, SIAM, Philadelphia