Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

dwt3

Single-level discrete 3-D wavelet transform

Syntax

WT = dwt3(X,'wname')
WT = dwt3(X,'wname','mode','ExtM')
WT = dwt3(X,W,...)
WT = dwt3(X,WF,...)

Description

dwt3 performs a single-level three-dimensional wavelet decomposition using either a particular wavelet ('wname') or the wavelet decomposition and reconstruction filters you specify. The decomposition also uses the specified DWT extension mode (see dwtmode).

WT = dwt3(X,'wname') returns the 3-D wavelet transform of the 3-D array X 'wname' is a character vector containing the wavelet name. The default extension mode is 'sym'. For more information on wname, see wfilters.

WT = dwt3(X,'wname','mode','ExtM') uses the extension mode 'ExtM'.

WT is a structure with the following fields shown in the table.

sizeINI

Size of the three-dimensional array X.

mode

Name of the wavelet transform extension mode.

filters

Structure with four fields: LoD, HiD, LoR, HiR, which are the filters used for DWT.

dec

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

dec{i,j,k}, i,j,k = 1 or 2 contains the coefficients obtained by lowpass filtering (for i or j or k = 1) or highpass filtering (for i or j or k = 2).

The i element filters along the rows of X, the j element filters along the columns, and the k element filters along the third dimension. For example, dec{1,2,1} is obtained by filtering X along the rows with the lowpass (scaling) filter, along the columns with the highpass (wavelet) filter, and along the third dimension with the lowpass (scaling) filter.

WT = dwt3(X,W,...) specifies three wavelets, one for each direction. W = {'wname1','wname2','wname3'} or W is a structure with 3 fields 'w1', 'w2', 'w3' containing character vectors that are the names of wavelets.

WT = dwt3(X,WF,...) specifies four filters, two for decomposition, and two for reconstruction or 3 × 4 filters (one quadruplet by direction). WF is either a cell array (1 × 4) or (3 × 4) : {LoD,HiD,LoR,HiR} or a structure with the four fields 'LoD','HiD','LoR','HiR'.

Examples

collapse all

Define the original 3-D data.

X = reshape(1:64,4,4,4)
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

Perform single-level decomposition of X using 'db1'.

wt = dwt3(X,'db1')
wt = 

  struct with fields:

    sizeINI: [4 4 4]
    filters: [1×1 struct]
       mode: 'sym'
        dec: {2×2×2 cell}

Decompose X using 'db2'.

[LoD,HiD,LoR,HiR] = wfilters('db2');
wt = dwt3(X,{LoD,HiD,LoR,HiR})
wt = 

  struct with fields:

    sizeINI: [4 4 4]
    filters: [1×1 struct]
       mode: 'sym'
        dec: {2×2×2 cell}

Decompose X using different wavelets, one for each orientation: 'db1', 'db2', and again 'db1'.

WS = struct('w1','db1','w2','db2','w3','db1');
wt = dwt3(X,WS,'mode','per')
wt = 

  struct with fields:

    sizeINI: [4 4 4]
    filters: [1×1 struct]
       mode: 'per'
        dec: {2×2×2 cell}

Decompose X using the filters given by WF and set the extension mode to symmetric.

WF = wt.filters;
wtBIS = dwt3(X,WF,'mode','sym')
wtBIS = 

  struct with fields:

    sizeINI: [4 4 4]
    filters: [1×1 struct]
       mode: 'sym'
        dec: {2×2×2 cell}

Introduced in R2010a

Was this topic helpful?