In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common
Options ), pamaddnoise recognizes the following command line options:
-typenoise_type
Select type of noise by name. The following noise types are available: gaussian,
multiplicative_gaussian, impulse, laplacian, poisson. Only enough letters to be unique are
required for the noise type option. The default noise type is gaussian.
gaussian
To each sample value is added the value of a two Gaussian random variables.
The variance of one is independent of the sample value, while the variance
of the other is proportional to the sample value. You control these
variances with options -sigma1 and -sigma2 (and can eliminate
either by setting the variance to 0). The mean of the Gaussian
distributions is 0.
multiplicative_gaussianimpulse
This is 'salt and pepper' noise. Samples are changed randomly
to zero or full brightness or left alone. This is also know as salt and
pepper noise, as in a grayscale picture, it adds white pixels and black
pixels, which look like salt and pepper, respectively. Control this with
options -tolerance and -salt.
laplacianpoisson-lambdavalue
This is valid only with -type=poisson. It is the expected value of the Poisson distribution for a
sample value of maximum intensity. The expected value for other intensities is proportional; e.g.
for half intensity, it is half this value.
The default value is 12.
-lsigmavalue
This is meaningful only for laplacian noise.
The default value is 10.0.
-mgsigmavalue
This is valid only for multiplicative gaussian noise.
The default value is 0.5.
-seedint
This is the random number generator seed value. Use this to get
repeatable results.
-sigma1value
This is valid only for gaussian noise. It is the standard deviation
of the Gaussian random variable that is multiplied by the square root of
each sample value and added to that sample value.
The default value is 4.0.
-sigma2value
This is valid only for gaussian noise.
It is the standard deviation of the Gaussian random variable that is
added directly to each sample value.
The default value is 20.0.
-tolerancefraction
This is valid only for impulse noise.
fraction is the fraction of samples that are changed
in the output. Whether each is changed to salt or pepper is controlled by
-salt.
The default value is 0.10.
-salt=fraction
This is valid only for impulse noise. fraction is the
fraction of the pixels that are changed that are changed to salt (maxval);
the rest are changed to pepper (0).
The default is 0.5 (half salt, half pepper).
This option was new in Netpbm 11.04 (September 2023). Before that, the
noise is always half salt and half pepper.