README.md

imgnoise

The goal of imgnoise is to provide mathematicians and researchers with a convenient method for generating noise in images and other signals stored as arrays in R.

Currently, the four types of noise supported are Gaussian, Salt and Pepper, Speckle, and Uniform Noise.

Installation

You can install imgnoise from github with:

```r

install.packages("devtools")

devtools::install_github("rayheberer/imgnoise")


## Example

This is a basic example which shows you how to implement gaussian noise.

```r
## Loading an image
library(png)
logo = readPNG(system.file("img", "Rlogo.png", package="png"))
## Applying Noise
imgnoise(logo, "salt_and_pepper", noise_density = 0.1)

LogoSaltPepperNoiseDensityPoint1.png is the result.

For reference, the un-noised image:

Other Examples

imgnoise(logo, "gaussian")

imgnoise(logo, "gaussian", variance = 0.5)

imgnoise(logo, "salt_and_pepper")

imgnoise(logo, "speckle")

imgnoise(logo, "speckle", variance = 0.08)

imgnoise(logo, "uniform")

imgnoise(logo, "uniform", lower_bound = -0.5, upper_bound = 0.5)



rayheberer/imgnoise documentation built on May 20, 2019, 2:46 p.m.