Image Processing Toolbox    
imnoise

Add noise to an image

Syntax

Description

J = imnoise(I,type) adds noise of given type to the intensity image I. type is a string that can have one of these values:

J = imnoise(I,type,parameters) accepts an algorithm type plus additional modifying parameters particular to the type of algorithm chosen. If you omit these arguments, imnoise uses default values for the parameters. Here are examples of the different noise types and their parameters:

Class Support

I can be of class uint8, uint16, or double. The output image J is of the same class as I. If I has more than two dimensions it is treated as a multidimensional intensity image and not as an RGB image.

Example

See Also

rand, randn in the MATLAB Function Reference


  immultiply imopen