Learn R Programming

wavethresh (version 4.7.3)

nullevels.imwd: Sets whole resolution levels of coefficients equal to zero in a imwd object.

Description

Sets whole resolution levels of coefficients equal to zero in a imwd.object

Usage

# S3 method for imwd
nullevels(imwd, levelstonull, ...)

Value

An object of class imwd where the coefficients in resolution levels specified by levelstonull have been set to zero.

Arguments

imwd

An object of class imwd.

levelstonull

An integer vector specifying which resolution levels of coefficients of imwd that you wish to set to zero.

...

any other arguments

RELEASE

Version 3.9.5 Copyright Guy Nason 1998

Author

G P Nason

Details

Setting whole resolution levels of coefficients to zero can be very useful. For examples, one can construct a linear smoothing method by setting all coefficients above a particular resolution (the primary resolution equal to zero. Also setting particular levels equal to zero can also be useful for removing noise which is specific to a particular resolution level (as long as important signal is not also contained at that level).

Note that this function removes the horiztonal, diagonal and vertical detail coefficients at the resolution level specified. It does not remove the father wavelet coefficients at those resolution levels.

To remove individual coefficients on a systematic basis you probably want to look at the threshold function.

See Also

nullevels, imwd, imwd.object, threshold.

Examples

Run this code
#
# Do the wavelet transform of the Lennon image
#
data(lennon)
lenimwd <- imwd(lennon)
#
# Set scales (resolution levels) 2, 4 and 6 equal to zero.
#
lenwdNL <- nullevels(lenimwd, levelstonull=c(2,4,6))
#
# Now let's plot the coefficients using a nice blue-heat colour map
#
# You will see that coefficients at levels 2, 4 and 6 are black (i.e. zero)
# You can see that coefficients at other levels are unaffected and still
# show the Lennon coefficients.
#
if (FALSE) plot(lenwdNL)

Run the code above in your browser using DataLab