Function Index
DiscreteWaveletTransform
DiscreteWaveletTransform[
img
,
h
]
returns the discrete wavelet transform (DWT) of
img
.
DiscreteWaveletTransform[
img
,
h
,
lev
]
returns the first
lev
levels of the DWT of
img
.
DiscreteWaveletTransform[
img
,
h
,
lev
,
{n
1
,
n
2
,
...}
]
returns the first
lev
levels of the DWT of a zero-padded
img
with dimensions n
1
×n
2
×....
DiscreteWaveletTransform
uses Mallat's algorithm.
DiscreteWaveletTransform
computes the periodic wavelet transform.
In the forward transform (i.e., decomposition) operation, the coefficients c
k
and d
k
at different scales are calculated based on the following convolution-like expressions
where
j
denotes the resolution and
k
is the index for the samples. This operation is a linear digital filtering operation followed by downsampling. The coefficients c
k
j
and d
k
j
are known, respectively, as the level
j
scaling and wavelet coefficients. The top-level coefficients c
J
represent the original signal. For a signal of length
N
, where
N
is a power of two, we get J=
Log[2,N]
. In such a case, the iteration may be repeated
J
times with the last stage being of length one, one scaling coefficient, and one wavelet coefficient. Note that the iteration is performed over the scaling coefficients only.
Similarly, the 2D wavelet transform is computed using 2D filtering and downsampling operations. At each scale, the coefficients are given by the following formulas:
where the filters h
0
, h
1
, h
2
, and h
3
are formed by vector outer products of the quadrature mirror filters
h
and
g.
h
0
= h
h
T
, h
1
= h
g
T
, h
2
= g
h
T
, h
3
= g
g
T
.
At each scale j, the array c
j
contains the low-frequency information from the previous stage, while d
j
, e
j
, and f
j
contain the horizontal, vertical, and bidirectional edge information (high-frequency), respectively.
The argument
img
may be any list or an
ImageData
expression.
See also User's Guide
8.6
.
Example
This loads the package.
In[1]:=
This creates a 2D Gaussian-shaped sequence.
In[2]:=
This computes the DWT.
In[3]:=
This shows the result of the 2-level decomposition of the Gaussian image.
In[4]:=
© 2008 Wolfram Research, Inc.
•
Terms of Use
•
Privacy Policy
Sign up for our newsletter: