dwww Home | Manual pages | Find package

Pamaddnoise User Manual(1)  General Commands Manual  Pamaddnoise User Manual(1)

NAME
       pamaddnoise - add noise to a Netpbm image

SYNOPSIS
       pamaddnoise { [-type gaussian]

       [-sigma1 value]

       [-sigma2 value] | -type  multiplicative_gaussian

       [-mgsigma value] | -type impulse

       [-tolerance ratio] | -type  laplacian

       [-lsigma value] | -type  poisson

       [-lambda value] } [-seed int]

       [netpbmfile]

DESCRIPTION
       This program is part of Netpbm(1).

       pamaddnoise  adds  the  specified  noise  type  to  a Netpbm image.  pa-
       maddnoise treats a PPM image as 3 independent planes, not as a plane  of
       colors in a color space.

OPTIONS
       In  addition  to  the  options common to all programs based on libnetpbm
       (most notably -quiet, see ]8;;index.html#commonoptions\ Common Options]8;;\ ), pamaddnoise recognizes  the
       following command line options:

       -type noise_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  con-
              trol these
                  variances with options -sigma1 and -sigma2 (and can eliminate
                  either by setting the variance to 0).  The mean of the Gauss-
              ian
                  distributions is 0.

       multiplicative_gaussian

       impulse

              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.   Con-
              trol this with
                  options -tolerance and -salt.

       laplacian

       poisson

       -lambda value
              This  is valid only with -type=poisson.  It is the expected value
              of the Poisson distribution for a sample value of maximum  inten-
              sity.   The expected value for other intensities is proportional;
              e.g. for half intensity, it is half this value.

              The default value is 12.

       -lsigma value
              This is meaningful only for laplacian noise.

              The default value is 10.0.

       -mgsigma value
              This is valid only for multiplicative gaussian noise.

              The default value is 0.5.

       -seed int
              This is the random number generator seed value.  Use this to get
                repeatable results.

       -sigma1 value
              This is valid only for gaussian noise.  It is the standard devia-
              tion
                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.

       -sigma2 value
              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.

       -tolerance fraction
              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.

REFERENCES
       •      "Adaptive Image Restoration in Signal-Dependent Noise" by R. Kas-
              turi  Institute  for  Electronic  Science, Texas Tech University,
              1982

       •      "Digital Image Processing Algorithms" by Ioannis Pitas,  Prentice
              Hall, 1993 ISBN 0-13-145814-0

SEE ALSO
       pgmnoise(1), pgmmedian(1), pnm(1), pam(1),

HISTORY
       pamaddnoise  was added to Netpbm in Version 10.29 (August 2005).  It had
       been distributed by Mike Burns via his own web  site  before  that  (and
       continued to be so).

       Burns'  version, and the one in Netpbm 10.29, was called pnmaddnoise and
       worked only on PNM images.  In Netpbm 10.30, it was converted to  handle
       PAM images and renamed to pamaddnoise.

AUTHOR
       Copyright (C) 1995 by Mike Burns <burns@cac.psu.edu>

DOCUMENT SOURCE
       This  manual  page  was generated by the Netpbm tool 'makeman' from HTML
       source.  The master documentation is at

              http://netpbm.sourceforge.net/doc/pamaddnoise.html

netpbm documentation             21 August 2023      Pamaddnoise User Manual(1)

Generated by dwww version 1.16 on Tue Dec 16 05:10:07 CET 2025.