Debian Codegraph @

upstream/debian-unstable/man1/pamaddnoise.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Pamaddnoise User Manual" 1 "21 August 2023" "netpbm documentation"
7
8 .SH NAME
9
10 pamaddnoise - add noise to a Netpbm image
11
12 .UN synopsis
13 .SH SYNOPSIS
14
15 \fBpamaddnoise\fP
16 {
17 [\fB-type\fP \fBgaussian\fP]
18
19 [\fB-sigma1\fP \fIvalue\fP]
20
21 [\fB-sigma2\fP \fIvalue\fP]
22 |
23 \fB-type \fP \fBmultiplicative_gaussian\fP
24
25 [\fB-mgsigma\fP \fIvalue\fP]
26 |
27 \fB-type\fP \fBimpulse\fP
28
29 [\fB-tolerance\fP \fIratio\fP]
30 |
31 \fB-type \fP \fBlaplacian\fP
32
33 [\fB-lsigma\fP \fIvalue\fP]
34 |
35 \fB-type \fP \fBpoisson\fP
36
37 [\fB-lambda\fP \fIvalue\fP]
38 }
39 [\fB-seed\fP \fIint\fP]
40
41 [\fInetpbmfile\fP]
42
43 .UN description
44 .SH DESCRIPTION
45 .PP
46 This program is part of
47 .BR "Netpbm" (1)\c
48 \&.
49 .PP
50 \fBpamaddnoise\fP adds the specified noise type to a Netpbm image.
51 \fBpamaddnoise\fP treats a PPM image as 3 independent planes, not as
52 a plane of colors in a color space.
53
54 .UN options
55 .SH OPTIONS
56 .PP
57 In addition to the options common to all programs based on libnetpbm
58 (most notably \fB-quiet\fP, see
59 .UR index.html#commonoptions
60 Common Options
61 .UE
62 \&), \fBpamaddnoise\fP recognizes the following
63 command line options:
64
65
66 .TP
67 \fB-type\fP \fInoise_type\fP
68 Select type of noise by name. The following noise types are
69 available: gaussian, multiplicative_gaussian, impulse, laplacian,
70 poisson. Only enough letters to be unique are required for the noise
71 type option. The default noise type is \fBgaussian\fP.
72
73
74 .TP
75 \fBgaussian\fP
76
77 To each sample value is added the value of a two Gaussian random variables.
78 The variance of one is independent of the sample value, while the variance
79 of the other is proportional to the sample value. You control these
80 variances with options \fB-sigma1\fP and \fB-sigma2\fP (and can eliminate
81 either by setting the variance to 0). The mean of the Gaussian
82 distributions is 0.
83
84 .TP
85 \fBmultiplicative_gaussian\fP
86 .TP
87 \fBimpulse\fP
88
89 This is 'salt and pepper' noise. Samples are changed randomly
90 to zero or full brightness or left alone. This is also know as salt and
91 pepper noise, as in a grayscale picture, it adds white pixels and black
92 pixels, which look like salt and pepper, respectively. Control this with
93 options \fB-tolerance\fP and \fB-salt\fP.
94
95 .TP
96 \fBlaplacian\fP
97
98 .TP
99 \fBpoisson\fP
100
101
102 .TP
103 \fB-lambda\fP \fIvalue\fP
104 This is valid only with \fB-type=poisson\fP. It is the expected value
105 of the Poisson distribution for a sample value of maximum intensity. The
106 expected value for other intensities is proportional; e.g. for half intensity,
107 it is half this value.
108 .sp
109 The default value is 12.
110
111 .TP
112 \fB-lsigma\fP \fIvalue\fP
113 This is meaningful only for laplacian noise.
114 .sp
115 The default value is 10.0.
116
117 .TP
118 \fB-mgsigma\fP \fIvalue\fP
119 This is valid only for multiplicative gaussian noise.
120 .sp
121 The default value is 0.5.
122
123 .TP
124 \fB-seed\fP \fIint\fP
125 This is the random number generator seed value. Use this to get
126 repeatable results.
127
128 .TP
129 \fB-sigma1\fP \fIvalue\fP
130 This is valid only for gaussian noise. It is the standard deviation
131 of the Gaussian random variable that is multiplied by the square root of
132 each sample value and added to that sample value.
133 .sp
134 The default value is 4.0.
135
136 .TP
137 \fB-sigma2\fP \fIvalue\fP
138 This is valid only for gaussian noise.
139 It is the standard deviation of the Gaussian random variable that is
140 added directly to each sample value.
141 .sp
142 The default value is 20.0.
143
144 .TP
145 \fB-tolerance\fP \fIfraction\fP
146 This is valid only for impulse noise.
147 \fIfraction\fP is the fraction of samples that are changed
148 in the output. Whether each is changed to salt or pepper is controlled by
149 \fB-salt\fP.
150 .sp
151 The default value is 0.10.
152
153 .TP
154 \fB-salt=\fIfraction\fP\fP
155
156 This is valid only for impulse noise. \fIfraction\fP is the
157 fraction of the pixels that are changed that are changed to salt (maxval);
158 the rest are changed to pepper (0).
159 .sp
160 The default is 0.5 (half salt, half pepper).
161 .sp
162 This option was new in Netpbm 11.04 (September 2023). Before that, the
163 noise is always half salt and half pepper.
164
165
166
167 .UN references
168 .SH REFERENCES
169
170
171 .IP \(bu
172 "Adaptive Image Restoration in Signal-Dependent Noise"
173 by R. Kasturi Institute for Electronic Science, Texas Tech University,
174 1982
175
176 .IP \(bu
177 "Digital Image Processing Algorithms" by Ioannis Pitas,
178 Prentice Hall, 1993 ISBN 0-13-145814-0
179
180
181
182 .UN seealso
183 .SH SEE ALSO
184 .BR "pgmnoise" (1)\c
185 \&,
186 .BR "pgmmedian" (1)\c
187 \&,
188 .BR "pnm" (1)\c
189 \&,
190 .BR "pam" (1)\c
191 \&,
192
193 .UN history
194 .SH HISTORY
195 .PP
196 \fBpamaddnoise\fP was added to Netpbm in Version 10.29 (August 2005).
197 It had been distributed by Mike Burns via his own web site before that
198 (and continued to be so).
199 .PP
200 Burns' version, and the one in Netpbm 10.29, was called \fBpnmaddnoise\fP
201 and worked only on PNM images. In Netpbm 10.30, it was converted to handle
202 PAM images and renamed to \fBpamaddnoise\fP.
203
204 .UN author
205 .SH AUTHOR
206
207 Copyright (C) 1995 by Mike Burns <\[email protected]\fP>
208 .SH DOCUMENT SOURCE
209 This manual page was generated by the Netpbm tool 'makeman' from HTML
210 source. The master documentation is at
211 .IP
212 .B http://netpbm.sourceforge.net/doc/pamaddnoise.html
213 .PP