denoise.dwt.2d | R Documentation |
Perform simple de-noising of an image using the two-dimensional discrete wavelet transform.
denoise.dwt.2d(
x,
wf = "la8",
J = 4,
method = "universal",
H = 0.5,
noise.dir = 3,
rule = "hard"
)
x |
input matrix (image) |
wf |
name of the wavelet filter to use in the decomposition |
J |
depth of the decomposition, must be a number less than or equal to log(minM,N,2) |
method |
character string describing the threshold applied, only
|
H |
self-similarity or Hurst parameter to indicate spectral scaling, white noise is 0.5 |
noise.dir |
number of directions to estimate background noise standard deviation, the default is 3 which produces a unique estimate of the background noise for each spatial direction |
rule |
either a |
See Thresholding
.
Image of the same dimension as the original but with high-freqency fluctuations removed.
B. Whitcher
See Thresholding
for references concerning
de-noising in one dimension.
Thresholding
## Xbox image
data(xbox)
n <- nrow(xbox)
xbox.noise <- xbox + matrix(rnorm(n*n, sd=.15), n, n)
par(mfrow=c(2,2), cex=.8, pty="s")
image(xbox.noise, col=rainbow(128), main="Original Image")
image(denoise.dwt.2d(xbox.noise, wf="haar"), col=rainbow(128),
zlim=range(xbox.noise), main="Denoised image")
image(xbox.noise - denoise.dwt.2d(xbox.noise, wf="haar"), col=rainbow(128),
zlim=range(xbox.noise), main="Residual image")
## Daubechies image
data(dau)
n <- nrow(dau)
dau.noise <- dau + matrix(rnorm(n*n, sd=10), n, n)
par(mfrow=c(2,2), cex=.8, pty="s")
image(dau.noise, col=rainbow(128), main="Original Image")
dau.denoise <- denoise.modwt.2d(dau.noise, wf="d4", rule="soft")
image(dau.denoise, col=rainbow(128), zlim=range(dau.noise),
main="Denoised image")
image(dau.noise - dau.denoise, col=rainbow(128), main="Residual image")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.