Function File: imnoise (A, type)
Function File: imnoise (…, options)

Add noise to image.

Function File: imnoise (A, "gaussian", mean, variance)

Additive gaussian noise with mean and variance defaulting to 0 and 0.01.

Function File: imnoise (A, "poisson")

Creates poisson noise in the image using the intensity value of each pixel as mean.

Function File: imnoise (A, "salt & pepper", density)

Create "salt and pepper"/"lost pixels" in density*100 percent of the image. density defaults to 0.05.

Function File: imnoise (A, "speckle", variance)

Multiplicative gaussian noise with B = A + A * noise with mean 0 and variance defaulting to 0.04.

See also: rand, randn, randp.

Demonstration 1

The following code

  A = imnoise (2^7 * ones (100, 'uint8'), 'poisson');
  subplot (2, 2, 1)
  imshow (A)
  title ('uint8 image with poisson noise')
  A = imnoise (2^15 * ones (100, 'uint16'), 'poisson');
  subplot (2, 2, 2)
  imshow (A)
  title ('uint16 image with poisson noise')
  A = imnoise (.5 * ones (100), 'poisson');
  subplot (2, 2, 3)
  imshow (A)
  title ('double image with poisson noise')
  A = imnoise (.5 * ones (100, 'single'), 'poisson');
  subplot (2, 2, 4)
  imshow (A)
  title ('single image with poisson noise')

Produces the following figure

Figure 1

Package: image