PAMADDNOISE(1)
π PAMADDNOISE(1) β the Pamaddnoise User Manual, but make it make sense π
okay bestie, this is a General Commands Manual page, and it's the Pamaddnoise User Manual. It's all about sprinkling noise on your images, and honestly? It ate. Let's get into it. π
β¨ 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]
like, read it slowly, it's a whole choose-your-own-adventure of noise types π
β¨ DESCRIPTION β¨
So this program is part of Netpbm(1). πΈ
pamaddnoise adds the noise type you asked for to a Netpbm image. That's it. That's the gig.
Important vibe check: pamaddnoise treats a PPM image as 3 independent planes, not as a plane of colors in a color space. That's the whole energy of this tool, no cap.
β¨ OPTIONS β¨
On top of the options that every libnetpbm-based program has (most notably -quiet, see Common Options), pamaddnoise is obsessed with these bad boys:
-typenoise_type β pick your noise by name. Your options are:gaussian,multiplicative_gaussian,impulse,laplacian,poisson. You only need to type enough letters for it to be unique, bestie β no need to spell out the whole thing. The default noise type isgaussian.
and now, the noise types themselves, in order:
gaussianβ to each sample value gets added the value of a two Gaussian random variables. π The variance of one of them doesn't care about the sample value at all (it's independent), while the other one's variance is proportional to the sample value. You control these two variances with the options-sigma1and-sigma2(and yeah, you can eliminate either one by setting its variance to 0). The mean of the Gaussian distributions is0. periodt.multiplicative_gaussianβ (the page gives this one no extra blurb of its own β the option list below is where it spills the tea) π«Άimpulseβ this is your classic 'salt and pepper' noise. Samples get randomly changed to zero or full brightness, or just left alone. It's also known as salt and pepper noise, because in a grayscale picture it adds white pixels and black pixels, which look like salt and pepper, respectively. π§ You control this with the options-toleranceand-salt.laplacianβ (no extra blurb on this one either, the-lsigmaoption below has you covered) πpoissonβ (also blurb-less on the page β see-lambdabelow) β
and here come the tuning knobs, in the exact order the page gives them:
-lambdavalue β this is valid only with-type=poisson. It's the expected value of the Poisson distribution for a sample value of maximum intensity. For other intensities the expected value is proportional; e.g. for half intensity, it's half this value. β¨ The default value is12.-lsigmavalue β meaningful only for laplacian noise. π The default value is10.0.-mgsigmavalue β valid only for multiplicative gaussian noise. π The default value is0.5.-seedint β this is the random number generator seed value. Use this to get repeatable results. π-sigma1value β valid only for gaussian noise. It's the standard deviation of the Gaussian random variable that gets multiplied by the square root of each sample value and added to that sample value. π The default value is4.0.-sigma2value β valid only for gaussian noise. It's the standard deviation of the Gaussian random variable that gets added directly to each sample value. π¦ The default value is20.0.-tolerancefraction β valid only for impulse noise. fraction is the fraction of samples that get changed in the output. Whether each changed sample becomes salt or pepper is controlled by-salt. π The default value is0.10.-salt=fractionβ valid only for impulse noise. fraction is the fraction of the pixels that are changed that get changed to salt (maxval); the rest get changed to pepper (0). π§ The default is0.5(half salt, half pepper). This option was new in Netpbm 11.04 (September 2023). Before that, the noise was always half salt and half pepper.
β¨ REFERENCES β¨
the receipts, bestie, we cite our sources π
- "Adaptive Image Restoration in Signal-Dependent Noise" by R. Kasturi 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 β¨
go read these too, they're iconic π
pgmnoise(1), pgmmedian(1), pnm(1), pam(1),
β¨ HISTORY β¨
lore time π°οΈ
pamaddnoise was added to Netpbm in Version 10.29 (August 2005). Before that it had been distributed by Mike Burns via his own web site (and continued to be so, fr fr).
Burns' version β and the one that landed in Netpbm 10.29 β was called pnmaddnoise and worked only on PNM images. In Netpbm 10.30, it got converted to handle PAM images and renamed to pamaddnoise. glow-up of the century honestly π
β¨ 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
and that's the whole page, bestie!! π₯³ no cap, every flag survived the rewrite.
signing off β netpbm documentation, dated 21 August 2023. mwah π π β¨ π¦
π¦ where this page comes from
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms