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
## S3 method for class 'imwd':
imwr(imwd, bc=imwd$bc, verbose = getOption("verbose"), ...)
## S3 method for class 'imwdc':
imwr(imwd, bc=imwd$bc, verbose = getOption("verbose"), ...)
Arguments
imwd
object of class imwd
or imwdc
respectively; typically
returned by imwd
and threshold.imwd
. bc
character, specifying the boundary handling. It is best left
to be the boundary handling specified by default.
verbose
logical; if true then informative messages are printed
detailing the computations to be performed.
...
further arguments to be passed to or from methods.
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 1993Details
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.Examples
Run this codeexample(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