summary refs log tree commit diff
path: root/pamaddnoise.html
blob: 3a0f39030bfe18cdedc2db620969f5837115e485 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pamaddnoise User Manual</title></head>
<body>
<h1>pamaddnoise</h1>
Updated: 12 December 2020
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

pamaddnoise - add noise to a Netpbm image

<h2 id="synopsis">SYNOPSIS</h2>

<b>pamaddnoise</b>

<br>
{
<br>

[<b>-type</b> <b>gaussian</b>]

[<b>-sigma1</b> <i>value</i>]

[<b>-sigma2</b> <i>value</i>]

<br>
|
<br>


<b>-type </b> <b>multiplicative_gaussian</b>

[<b>-mgsigma</b> <i>value</i>]

<br>
|
<br>

<b>-type</b> <b>impulse</b>

[<b>-tolerance</b> <i>ratio</i>]

<br>
|
<br>

<b>-type </b> <b>laplacian</b>

[<b>-lsigma</b> <i>value</i>]

<br>
|
<br>

<b>-type </b> <b>poisson</b>

[<b>-lambda</b> <i>value</i>]

<br>
}
<br>

[<b>-seed</b> <i>int</i>]

[<i>netpbmfile</i>]

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>pamaddnoise</b> adds the specified noise type to a Netpbm image.
<b>pamaddnoise</b> treats a PPM image as 3 independent planes, not as
a plane of colors in a color space.

<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>pamaddnoise</b> recognizes the following
command line options:

<dl compact>
<dt><b>-lambda</b> <i>value</i>

<dd>This is the expected value of the Poisson distribution for a sample value
  of mximum intensity.  The expected value for other intensities is
  proportional; e.g. for half intensity, it is half this value.

<p>This is meaningful only with <b>-type=poisson</b>.

<p>The default value is 12.

<dt><b>-lsigma</b> <i>value</i>

<dd>Used for laplacian noise only.  The default value is 10.0.

<dt><b>-mgsigma</b> <i>value</i>

<dd>Used for multiplicative gaussian noise only.  The default value is
0.5.

<dt><b>-seed</b> <i>int</i>

<dd>Used for all noise types.  Set the initial random number generator
seed value.

<dt><b>-sigma1</b> <i>value</i>

<dd>Used for gaussian noise only.  The default value is 4.0.

<dt><b>-sigma2</b> <i>value</i>

<dd>Used for gaussian noise only.  The default value is 20.0.

<dt><b>-tolerance</b> <i>ratio</i>

<dd>
Used for impulse noise only.  The default value is 0.10.  This means
that 5% of all pixel values will be set to 0 and 5% will be set to
the maxval

<dt><b>-type</b> <i>noise_type</i>

<dd>
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 <b>gaussian</b>.

<ul>
<li><b>gaussian</b>
<li><b>multiplicative_gaussian</b>
<li><b>impulse</b>
<li><b>laplacian</b>
<li><b>poisson</b>
</ul>

</dl>

<h2 id="references">REFERENCES</h2>

<ul>
<li>"Adaptive Image Restoration in Signal-Dependent Noise"
by R. Kasturi Institute for Electronic Science, Texas Tech University,
1982

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

</ul>

<h2 id="seealso">SEE ALSO</h2>

<a href="pgmnoise.html">pgmnoise</a>,
<a href="pgmmedian.html">pgmmedian</a>,
<a href="pnm.html">pnm</a>,
<a href="pam.html">pam</a>,

<h2 id="history">HISTORY</h2>

<p><b>pamaddnoise</b> 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).

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

<h2 id="author">AUTHOR</h2>

Copyright (C) 1995 by Mike Burns &lt;<a
href="mailto:burns@cac.psu.edu">burns@cac.psu.edu</a>&gt;

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#references">REFERENCES</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#history">HISTORY</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>