Learn R Programming

wavethresh (version 2.2-3)

imwr.imwd: 2D Inverse Discrete Wavelet Transform (Image W. Reconstruction)

Description

These functions perform the reconstruction stage of Mallat's pyramid algorithm, i.e. the inverse discrete wavelet transform for images.

Usage

imwr.imwd (imwd, bc=imwd$bc, verbose=FALSE)
imwr.imwdc(imwdc,bc=imwd$bc, verbose=FALSE)

Arguments

imwd,imwdc
An object of class imwd or imwdc respectively. Typically these are returned by imwd and threshold.imwd.
bc
character, specifying the boundary handling. It is best left to be the boundary handling specified by that in the supplied argument.
verbose
logical; if true then informative messages are printed detailing the computations to be performed.

Value

  • A matrix, of dimension determined by the original data set supplied to the initial decomposition (more precisely, determined by the nlevels component of the imwd.object). This matrix is the highest resolution level of the reconstruction. If a imwd (decomposition) is followed immediately by a imwr (reconstruction) then the returned matrix will be exactly the same as the original image.

RELEASE

Release 2.2 Copyright Guy Nason 1993

Details

Details of the algorithm are to be found in Mallat (1989). As for "imwd" the algorithm works by applying many 1D reconstruction algorithms to the coefficients. The filters used are those described in Daubechies (1988).

This function is a method for the generic function imwr() for class imwd. It can be invoked by calling imwr(x) for an object x of the appropriate class, or directly by calling imwr.imwd(x) regardless of the class of the object.

References

see wd for a list.

See Also

imwd, plot, threshold

Examples

Run this code
example(imwd)
# Look at the error
summary( abs(c(imwr(imwdL) - lennon)))#around 1e-9

## Threshold after decomposing an image -- automagically compresses:
(tdi <- threshold(imwdL))

## Now reconstruct;  imwr calling imwr.imwdc directly
filled.contour(answer <- imwr(tdi))

Run the code above in your browser using DataLab