Syntax
Document.AddNoise ( Type, Amplitude )
Parameters
NoiseType Type - specifies the type of noise to be added:
mxUniformNoise (0) : uniformly distributed
mxGaussianNoise (1) : gaussian distribution
Float Amplitude - For uniform noise, specifies the peak-to-peak variation of the noise. For gaussian noise, specifies the standard deviation of the noise.
Returns
Nothing
Remarks
Modifies every pixel of this document by adding a random number drawn from a distribution characterized by Type and Amplitude. If the image is tricolor, the same random value is added to each of the Red, Blue, and Green planes. In this way only the brightness of the pixel is affected, not its chroma.
For uniform noise, each pixel can change by from -Amplitude to +Amplitude. For gaussian noise, 68% of the pixels change by not more than Amplitude (positive or negative), 27% more change by up two times Amplitude, and 4.3% change by up to three times Amplitude. In no case is a pixel allowed to be negative; instead, it is clipped at zero.
This method is equivalent to the Add Noise command.