nag_wav_3d_coeff_ins (c09fzc) inserts a selected set of three-dimensional discrete wavelet transform (DWT) coefficients into the full set of coefficients stored in compact form, which may be later used as input to the reconstruction functions
nag_idwt_3d (c09fbc) or
nag_imldwt_3d (c09fdc).
nag_wav_3d_coeff_ins (c09fzc) inserts a selected set of three-dimensional DWT coefficients into the full set of coefficients stored in compact form in a one-dimensional array
c. It is required that nag_wav_3d_coeff_ins (c09fzc) is preceded by a call to the initialization function
nag_wfilt_3d (c09acc) and either the forwards transform function
nag_dwt_3d (c09fac) or multi-level forwards transform function
nag_mldwt_3d (c09fcc).
Given an initial three-dimensional data set
, a prior call to
nag_dwt_3d (c09fac) or
nag_mldwt_3d (c09fcc) computes the approximation coefficients (at the highest requested level in the case of
nag_mldwt_3d (c09fcc)) and, seven sets of detail coefficients (at all levels in the case of
nag_mldwt_3d (c09fcc)) and stores these in compact form in a one-dimensional array
c.
nag_wav_3d_coeff_ext (c09fyc) can then extract either the approximation coefficients or one of the sets of detail coefficients (at one of the levels following
nag_mldwt_3d (c09fcc))
as three-dimensional data into the array,
d. Following some calculation on this set of coefficients (for example, denoising), the updated coefficients in
d are inserted back into the full set
c using nag_wav_3d_coeff_ins (c09fzc). Several extractions and insertions may be performed.
nag_idwt_3d (c09fbc) or
nag_imldwt_3d (c09fdc) can then be used to reconstruct a manipulated data set
. The dimensions of
the three-dimensional data stored in
d depend on the level extracted and are available from either: the arrays
dwtlvm,
dwtlvn and
dwtlvfr as returned by
nag_mldwt_3d (c09fcc) if this was called first; or, otherwise from
nwct,
nwcn and
nwcfr as returned by
nag_wfilt_3d (c09acc). See
Section 2.1 in the c09 Chapter Introduction for a discussion of the three-dimensional DWT.
None.
Note: the following notation is used in this section:
Not applicable.
Not applicable.
None.
The following example demonstrates using the coefficient extraction and insertion functions in order to apply denoising using a thresholding operation. The original input data has artificial noise introduced to it, taken from a normal random number distribution. Reconstruction then takes place on both the noisy data and denoised data. The Mean Square Errors (MSE) of the two reconstructions are printed along with the reconstruction of the denoised data. The MSE of the denoised reconstruction is less than that of the noisy reconstruction.