DenoiseDCT: denoise image by DCT denoising

Description Usage Arguments Value Author(s) References Examples

View source: R/DCT_denoising.R

Description

denoise image by DCT denoising

Usage

1
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

Author(s)

Shota Ochi

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

1
2
3
4
5
6
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")

Example output

Loading required package: imager
Loading required package: magrittr

Attaching package:imagerThe following object is masked frompackage:magrittr:

    add

The following objects are masked frompackage:stats:

    convolve, spectrum

The following object is masked frompackage:graphics:

    frame

The following object is masked frompackage:base:

    save.image

imagerExtra documentation built on May 2, 2019, 1:44 p.m.