dwt.2d(x, wavelet="s8", n.levels=NULL, boundary="periodic", precondition=F, dual=F, analysis.filter=NULL, synthesis.filter=NULL, filter.reverse=F) idwt.2d(x)
idwt.2d
only, an object of class
dwt.2d
.
wavelet
is one, the same wavelet is used for both
row and column. See
wavelet
for details.
For user-provided filter, input the values the
filter
argument (see below).
boundary
is one, the same boundary rule is used for both
row and column.
Available boundary rules are
"periodic", "poly0", "poly1", "poly2"
,
"reflection", "interval", "zero"
. See
dwt
for more details.
boundary="interval"
only. If
TRUE
, then the data will be
transformed. The transformation has the following property: the transformed
unit vector is invariant under the low-pass filtering and decimation operation.
FALSE
.
"dwt.2d"
, inheriting from the classes
"wpt.2d"
and
"crystal.matrix"
. See
crystal.matrix.object
for details.
idwt.2d
returns an image if
x
is an object of class
"dwt.2d"
.
Theories and algorithms are described in Chapter 10 of Daubechies (1992) and Mallat (1989). We can manipulate 2D transforms and apply many of the same generic functions as for 1D discrete wavelet transforms. See the example below.
Daubechies, I. (1992). Ten Lectures on Wavelets. SIAM, Philadelphia.
xx <- phone-mean(phone) par(mfrow=c(1, 2)) image(xx) dmat <- dwt.2d(xx, wavelet="s8", n.levels=3) thresh <- rep(0, 10) thresh[-10] <- quantile(abs(as.vector(dmat)), 0.7) smat <- shrink(dmat, threshold=thresh) # use top 30% coefficients rec2 <- reconstruct(smat) image(rec2)