Learn R Programming

GSCAD (version 0.1.0)

denoise: Use a given dictionary D to denoise image.

Description

Denoise Y give D in Y=DA.

Usage

denoise(Y, D, sigma)

Arguments

Y

Each column of Y is a vectorized image patch to be denoised.

D

D is the dictionary used in Y=DA to denoise.

sigma

Noise level.

Value

The denoised matrix Y.

Details

See https://arxiv.org/abs/1605.07870

Examples

Run this code
# NOT RUN {
I = lena_crop #use a smaller image as an example
## add noise
sigma=20;
I_noise=AddNoise(I,sigma)
## spliting image into patches
m=64;
Y_nc = ImageSplit(I_noise,sqrt(m),sqrt(m));
mu=colMeans(Y_nc)
Y=Y_nc-rep(mu,each=nrow(Y_nc))
## use ODCT dictionary
D0=ODCT(64,100)
## denoise
# }
# NOT RUN {
Y_denoise=denoise(Y,D0,sigma)
# }

Run the code above in your browser using DataLab