summary refs log tree commit diff
path: root/pamgauss.html
blob: cef20227ea640de811aabbafacf7b48cc5e332b7 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pamgauss User Manual</TITLE></HEAD>
<BODY>
<H1>pamgauss</H1>
Updated: 8 May 2004
<BR>
<A HREF="#index">Table Of Contents</A>

<A NAME="name">&nbsp;</A>
<H2>NAME</H2>

pamgauss - create a two dimensional gaussian function as a PAM image

<A NAME="synopsis">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>pamgauss</B>
<i>width</i>
<i>height</i>
<b>-sigma=</b><i>number</i>
[<b>-maxval=</b><i>number</i>]
[<b>-tupletype=</b><i>string</i>]


<p>Minimum unique abbreviation of option is acceptable.  You may use double
hyphens instead of single hyphen to denote options.  You may use white
space in place of the equals sign to separate an option name from its value.



<A NAME="examples">&nbsp;</A>
<H2>EXAMPLES</H2>

<pre>
     pamgauss 3 3 -sigma=.5 -tupletype=GRAYSCALE | pamtopnm &gt;gauss.pgm
     pnmconvol -nooffset gauss.pgm myimage.ppm &gt;blurred.ppm
</pre>

<A NAME="description">&nbsp;</A>
<H2>DESCRIPTION</H2>

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

<p><b>pamgauss</b> generates a one-plane PAM image whose samples are a
gaussian function of their distance from the center of the image.  I.e.
the sample value is highest in the center and goes down, in a bell curve
shape, as you move away from the center.

<p>The values are scaled so that the area under the surface of the
two-dimensional Gaussian function is the maxval of the image.

<p>You can use this image, converted to PGM, as a convolution kernel
with <b>pnmconvol</b> to blur an image.  (This technique is known as
Gaussian blurring).

<i>width</i> and <i>height</i> are the dimensions of the image that
<b>pamgauss</b> generates.  Mathematically speaking, they are the domain
of the two dimensional gaussian function.

<p>The sum of all the samples is equal to the image's maxval (within
rounding error).  This is true even if you clip the Gaussian function
by making the image too small.  If you want to be sure you get a whole
Gaussian function, make sure that you choose a sigma and image
dimensions so that if you made it any larger, the sample values at the
edges would be zero.

<p>The output image is PAM.  To turn it into a PGM that you can use
with <b>pnmconvol</b>, specify <b>-tupletype=GRAYSCALE</b> and pass
the output through <b>pamtopnm</b>.  You must use the <b>-nooffset</b>
option on <b>pnmconvol</b> because zero means zero in the PAM that
<b>pamgauss</b> generates.

<A NAME="options">&nbsp;</A>
<H2>DESCRIPTION</H2>

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

<dl>
<dt><b>-sigma=</b><i>number</i>

<dd>This is the sigma parameter of the Gaussian function (if it were a
Gaussian probability function, this would be its standard deviation).
The higher the number, the more spread out the function is.  Normally,
you want to make this number low enough that the function reaches zero
value before the edge of your image.

<p><i>number</i> is in units of pixels.

<p>This option is required.  There is no default.

<dt><b>-maxval=</b><i>number</i>
<dd>This is the maxval for the output image.  It defaults to 255.

<dt><b>-tupletype=</b><i>string</i>
<dd>
This is the value of the "tuple_type" attribute of the created PAM image.
It can be any string up to 255 characters.  If you don't specify this,
<b>pamgauss</b> generates a PAM with unspecified tuple type.

</dl>

<A NAME="seealso">&nbsp;</A>
<H2>SEE ALSO</H2>

<B><A HREF="pnmconvol.html">pnmconvol</A></B>,
<B><A HREF="pamtopnm.html">pamtopnm</A></B>,
<B><A HREF="pgmkernel.html">pgmkernel</A></B>,
<B><A HREF="pamseq.html">pamseq</A></B>,
<B><A HREF="pam.html">pam</A></B>

<A NAME="history">&nbsp;</A>
<H2>HISTORY</H2>

<p><b>pamgauss</b> was new in Netpbm 10.23 (July 2004).

<HR>
<A NAME="index">&nbsp;</A>
<H2>Table Of Contents</H2>
<UL>
<LI><A HREF="#name">NAME</A>
<LI><A HREF="#synopsis">SYNOPSIS</A>
<LI><A HREF="#examples">SYNOPSIS</A>
<LI><A HREF="#description">DESCRIPTION</A>
<LI><A HREF="#seealso">SEE ALSO</A>
<LI><A HREF="#history">AUTHORS</A>
</UL>
</BODY>
</HTML>