salt_and_pepper_noise: Take a numeric and, with a specified probability to do so,...

Description Usage Arguments Examples

Description

Take a numeric and, with a specified probability to do so, set it equal to either 0 or 1 with a 50 percent probability for each option, or otherwise leave it as is.

Usage

1
salt_and_pepper_noise(image, noise_density = 0.05)

Arguments

image

A numeric. Should be an element of an array.

noise_density

The probability with which the function will then set the numeric equal to 0 or 1.

Examples

1
2

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