Learn R Programming

imagerExtra (version 1.3.2)

DenoiseDCT: denoise image by DCT denoising

Description

denoise image by DCT denoising

Usage

DenoiseDCT(im, sdn, flag_dct16x16 = FALSE)

Arguments

im

a grayscale image of class cimg

sdn

standard deviation of Gaussian white noise

flag_dct16x16

flag_dct16x16 determines the size of patches. if TRUE, the size of patches is 16x16. if FALSE, the size if patches is 8x8.

Value

a grayscale image of class cimg

References

Guoshen Yu, and Guillermo Sapiro, DCT Image Denoising: a Simple and Effective Image Denoising Algorithm, Image Processing On Line, 1 (2011), pp. 292-296. https://doi.org/10.5201/ipol.2011.ys-dct

Examples

Run this code
# NOT RUN {
dev.new()
par(mfcol = c(1,2))
boats_g <- grayscale(boats)
boats_noisy <- imnoise(dim = dim(boats_g), sd = 0.05) + boats_g 
plot(boats_noisy, main = "Noisy Boats")
DenoiseDCT(boats_g, 0.05) %>% plot(., main = "Denoised Boats")
# }

Run the code above in your browser using DataLab