Main Content

idwt3

Single-level 3-D inverse discrete wavelet transform

Syntax

X = idwt3(WT)
C = idwt3(WT,TYPE)

Description

The idwt3 command performs a single-level three-dimensional wavelet reconstruction starting from a single-level three-dimensional wavelet decomposition.

X = idwt3(WT) computes the single-level reconstructed 3-D array X, based on the three-dimensional wavelet decomposition stored in the WT structure. This structure contains the following fields.

sizeINI

Size of the three-dimensional array X.

mode

Name of the wavelet transform extension mode.

filters

Structure with 4 fields, LoD, HiD, LoR, HiR, which contain the filters used for DWT.

dec

2 x 2 x 2 cell array containing the coefficients of the decomposition.

dec{i,j,k}, i,j,k = 1 or 2 contains the coefficients obtained by low-pass filtering (for i or j or k = 1) or high-pass filtering (for i or j or k = 2).

C = idwt3(WT,TYPE) computes the single-level reconstructed component based on the three-dimensional wavelet decomposition. Valid values for TYPE are:

  • A group of three characters 'xyz', one per direction, with 'x','y' and 'z' selected in the set {'a','d','l','h'} or in the corresponding uppercase set {'A','D','L','H'}), where 'A' (or 'L') specifies low-pass filter and 'D' (or 'H') specifies highpass filter.

  • The char 'd' (or 'h' or 'D' or 'H') which specifies the sum of all the components different from the lowpass component.

Examples

collapse all

Define the original 3-D data.

X  = reshape(1:64,4,4,4)
X = 
X(:,:,1) =

     1     5     9    13
     2     6    10    14
     3     7    11    15
     4     8    12    16


X(:,:,2) =

    17    21    25    29
    18    22    26    30
    19    23    27    31
    20    24    28    32


X(:,:,3) =

    33    37    41    45
    34    38    42    46
    35    39    43    47
    36    40    44    48


X(:,:,4) =

    49    53    57    61
    50    54    58    62
    51    55    59    63
    52    56    60    64

Decompose X using 'db1'.

wt = dwt3(X,'db1');

Reconstruct X from the coefficients. Verify that the reconstructed data agrees with the original data to machine precision.

XR = idwt3(wt);

dff = max(abs(X-XR))
dff = 
dff(:,:,1) =

   1.0e-13 *

    0.0266    0.0355    0.0888    0.1066


dff(:,:,2) =

   1.0e-13 *

    0.1066    0.1066    0.2132    0.2132


dff(:,:,3) =

   1.0e-13 *

    0.1421    0.1421    0.2132    0.2132


dff(:,:,4) =

   1.0e-13 *

    0.3553    0.3553    0.2842    0.2842

Compute the reconstructed approximation, which consists of the lowpass component.

A  = idwt3(wt,'aaa');

Compute the sum of all the components different from the lowpass component.

D  = idwt3(wt,'d');

Reconstruct the component associated with lowpass in the x and z directions and highpass in the y direction.

ADA  = idwt3(wt,'ada');

Version History

Introduced in R2010a

See Also

| |