wpt.2d(x, crystal.names=NULL, basis=NULL, cost.fun="entropy", wavelet="s8", n.levels=4, boundary="periodic", precondition=F, dual=F, analysis.filter=NULL, synthesis.filter=NULL, filter.reverse=F, scale=NULL, thresh=NULL, p=2, prob=.75) iwpt.2d(x)
iwpt.2d
only, an object of
wpt.2d
.
crystal.names
for details.
If
crystal.names
is supplied, then
basis
is ignored.
"best.basis"
or
"dwt.2d"
.
See the respective help files for details.
"entropy"
,
"threshold"
,
"sure"
, and "
lp
" are available.
Only used for
"best.basis"
. See
wp.costs.2d
for details.
wavelet
is
one, the same wavelet is used for both rows and columns.
See
wavelet.packet
for a list of all available wavelet names.
x
is divided into
2^(2*n.levels)
nrow(x)/2^n.levels
by
ncol(x)/2^n.levels
blocks. For
"best.basis"
,
n.levels
gives the blocking factor for the finest level.
When both
crystal.names
and
basis
are missing,
2D subband basis of
n.levels
is computed.
If
n.levels
is bigger than
ml
, where
ml
is the maximum possible level,
computed from the
max.level
function, then
n.levels
is set to
ml
and
a warning message is given.
boundary
is one, the same boundary rule is used for both
row and column.
All the boundary rules listed for
dwt
are available except for
"infinite"
and
"polynomial"
. See
dwt
for the definitions of these rules.
boundary="interval"
only.
See
dwt
for details.
dwt
for details.
cost.fun
.
See the function
cp.costs.2d
for details.
(0,2]
giving the degree of the
lp norm when
cost.fun
is
"lp"
.
See the function
cp.costs.2d
for details.
cost.fun
is
"threshold"
or
"sure"
.
See the function
cp.costs.2d
for details.
(0,1)
used to
compute the threshold for when
cost.fun
is
"threshold"
.
See the function
cp.costs.2d
for details.
wpt.2d
, inheriting from the class
crystal.matrix
.
The object is a matrix of the same size as
x
with crystal names as an
attribute.
iwpt.2d
returns an image if
x
is an object of class
wpt.2d
.
The default optional arguments
n.levels, taper, dct.type, boundary
can be reset using function
wavelet.options
. See
wavelet.options
for details.
Wickerhauser, M. V. (1994). Adapted Wavelet Analysis from Theory to Software. A. K. Peters Ltd, Wellesley, MA.
xx <- phone-mean(phone) par(mfrow=c(1,2)) thresh <- rep(3.7, 16) dd2 <- dwt.2d(xx, wavelet="s8", n.levels=3) ss1 <- shrink(dd2, thresh) zz1 <- reconstruct(ss1) image(zz1) # reconstructed by DWT cc2 <- wpt.2d(xx, basis="best.basis", wavelet="s8", n.levels=3) ss2 <- shrink(cc2, thresh) zz2 <- reconstruct(ss2) image(zz2) # reconstructed by best basis