Description Usage Arguments Value Note See Also Examples
wavelet.threshold
is a more user-friendly function for
thresholding wavelet coefficients stored in an wd
or imwd
object. It
combines the functions extract.coefficients
,
estimate.sdev
(rescales the coefficients accordingly),
treethresh
or wtthresh
,
prune
, thresh
, and
insert.coefficients
1 2 |
object |
An object of the class |
sdev |
The standard error of the noise (if known), otherwise
|
dev |
The function used to estimate the standard error. Typical
examples are |
start.level |
The level in the wavelet transform from which to commence thresholding the wavelet coefficients. This level and all those finer levels will be thresholded. |
levelwise |
Indicates whether the thresholding should be carried
out independently for each level and type of coefficients as in the
function |
v |
The number of folds in the cross-validation used to determine
the optimal subtree in the pruning step (see the function
|
sd.mult |
The smallest subtree that is not |
postmed |
Controls whether thresholding is to be carried out by
using the posterior median of the coefficient mu|y
( |
... |
arguments passed to to |
Returns an object of the class wd
or
wtthresh
, where the coefficients have
been thresholded using the TreeThresh algorithm.
wavelet.treethresh
combines the functions extract.coefficients
,
estimate.sdev
(and the appropriate scaling), treethresh
/
wtthresh
, prune
,
insert.coefficients
into a single (hopefully) more
user-friendly function.
extract.coefficients
, estimate.sdev
,
treethresh
, wtthresh
, prune
,
thresh
, insert.coefficients
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## The following examples shows how an example image can be
## thresholded step by step. All the steps are combined in the more
## user-friendly function wavelet.treethresh
## (01) Load the example image
data(tiles)
## (02) Display the image
par(mai=rep(0,4)) ; image(tiles,col=grey(0:255/255))
## (03) Add noise to the image
corrupted <- tiles + rnorm(length(tiles))
## (04) Display the corrupted image
par(mai=rep(0,4)) ; image(corrupted,col=grey(0:255/255))
## (05) Compute the wavelet transform
corrupted.wt <- imwd(corrupted)
## (06) Perform the thresholding
denoised.wt <- wavelet.treethresh(corrupted.wt)
## (07) Compute inverse wavelet transform
denoised <- imwr(denoised.wt)
## (08) Display denoised image
par(mai=rep(0,4)) ; image(denoised,col=grey(0:255/255))
## (09) Compute l2 loss
sum((denoised-tiles)^2)
## The call to wavelet.treethresh is equivalent to steps (06) to (13)
## of the example in the help section "coefficients".
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.