dwt.2d(x, wavelet="s8", n.levels=NULL, boundary="periodic", precondition=F, dual=F, analysis.filter=NULL, synthesis.filter=NULL) idwt.2d(x)
idwt.2d returns an image if x is an object of class "dwt.2d".
We can manipulate 2D transforms and apply many of the same generic functions as for 1D discrete wavelet transforms. See the example below.
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)