denoisePatches: Denoising of image patches

Description Usage Arguments Value Note Examples

Description

Denoising of image patches based on the clustering of patches.

Usage

1
denoisePatches(Y,out,P,sigma=10)

Arguments

Y

a data frame containing as rows the image patches to denoise

out

the mixmodCluster object that contains mixture parameters

P

the posterior probabilities that patches belong to the clusters

sigma

the noise standard deviation

Value

A data fame of the denoised patches is returned.

Note

C. Bouveyron & J. Delon

Examples

1
2
3
4
5
6
7
8
Im = diag(16) 
ImNoise = Im + rnorm(256,0,0.1)
X = imageToPatch(ImNoise,4)
out = mixmodCluster(X,10,model=mixmodGaussianModel(family=c("spherical")))
res = mixmodPredict(X,out@bestResult)
Xdenoised = denoisePatches(X,out,P = res@proba,sigma = 0.1) 
ImRec = reconstructImage(Xdenoised,16,16)
par(mfrow=c(1,3)); imshow(Im); imshow(ImNoise); imshow(ImRec)

Example output

Loading required package: mclust
Package 'mclust' version 5.4.7
Type 'citation("mclust")' for citing this R package in publications.
Loading required package: Rmixmod
Loading required package: Rcpp
Rmixmod v. 2.1.5 / URI: www.mixmod.org
Loading required package: MASS
Loading required package: mvtnorm

Attaching package:mvtnormThe following object is masked frompackage:mclust:

    dmvnorm

MBCbook documentation built on July 2, 2019, 9:08 a.m.