Learn R Programming

CVThresh (version 1.1.2)

cvwavelet.image: Wavelet reconstruction of image by level-dependent Cross-Validation

Description

This function reconstructs image by level-dependent cross-validation wavelet shrinkage.

Usage

cvwavelet.image(images, imagewd,
    cv.optlevel, cv.bsize=c(1,1), cv.kfold, cv.tol=0.1^3, cv.maxiter=100,
    impute.tol=0.1^3, impute.maxiter=100, filter.number=2, ll=3)

Arguments

images

noisy image

imagewd

two-dimensional wavelet transform

cv.optlevel

thresholding level

cv.bsize

block size of cross-validation

cv.kfold

the number of fold of cross-validation

cv.tol

tolerance for cross-validation

cv.maxiter

maximum iteration for cross-validation

impute.tol

tolerance for imputation

impute.maxiter

maximum iteration for imputation

filter.number

specifies the smoothness of wavelet in the decomposition (argument of WaveThresh)

ll

specifies the lowest level to be thresholded

Value

imagecv

reconstruction of image by level-dependent cross-validation wavelet shrinkage

cvthresh

threshold values by level-dependent cross-validation

Details

This function performs level-dependent cross-validation wavelet shrinkage for two-dimensional data.

See Also

cvtype.image, cvimpute.image.by.wavelet, cvwavelet.image.after.impute.

Examples

Run this code
# NOT RUN {
# Generate Noisy Lennon Image
data(lennon)
sdimage <- sd(as.numeric(lennon))
nlennon <- ncol(lennon); nlevel <- log2(ncol(lennon))
optlevel <- c(3:(nlevel-1))
set.seed(55)
lennonnoise <- lennon+matrix(rnorm(nlennon^2, 0, sdimage), nlennon, nlennon)

# Level-dependent Cross-validation Thresholding
lennonwd <- imwd(lennonnoise)
#lennoncv <- cvwavelet.image(images=lennonnoise, imagewd=lennonwd,
#      cv.optlevel=optlevel, cv.bsize=c(1,1), cv.kfold=10)$imagecv
#image(lennoncv, axes=FALSE, col=gray(100:0/100), 
#   main="Level-dependent CV")
# }

Run the code above in your browser using DataLab