Learn R Programming

GSCAD (version 0.1.0)

denoiseImage: Use a given dictionary D to denoise image.

Description

The noisy image is split into sqrt(m) by sqrt(m) patches. Each patch is vectorized into a column of matrix Y. Using the given D, the sparse coding A_hat in Y=DA is obtained. Then Y_denoise=DA_hat. The final denoised image is reconstruncted on the denoised patches.

Usage

denoiseImage(I_noise, D, sigma, stepsize = 1)

Arguments

I_noise

The image to be denoised. In form of matrix.

D

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

sigma

Noise level.

stepsize

(optional) The stepsize when splicting the image. Default is 1

Value

The denoised image in for of a matrix.

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)
## use ODCT dictionary
D0=ODCT(64,100)
## denoise
# }
# NOT RUN {
I_clean=denoiseImage(I_noise,D0,sigma)
# }

Run the code above in your browser using DataLab