summary refs log tree commit diff
path: root/pamgauss.html
blob: f3bd38e254fbfb7b730679f905e8b6657de229ca (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
<!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>

<H2>NAME</H2>

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

<H2 id="synopsis">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.


<H2 id="examples">EXAMPLES</H2>

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

<H2 id="description">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 volume under the surface of the
two-dimensional Gaussian function is the maxval of the image.

<p>You can use this image 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 make it usable with <b>pnmconvol</b>,
specify <b>-tupletype=GRAYSCALE</b> so <b>pnmconvol</b> can use it as
if it were PGM.  You must use the <b>-nooffset</b> option on
<b>pnmconvol</b> because zero means zero in the PAM that
<b>pamgauss</b> generates.

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

<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>
<H2 id="index">Table Of Contents</H2>
<UL>
<LI><A HREF="#synopsis">SYNOPSIS</A>
<LI><A HREF="#examples">EXAMPLES</A>
<LI><A HREF="#description">DESCRIPTION</A>
<LI><A HREF="#seealso">SEE ALSO</A>
<LI><A HREF="#history">AUTHORS</A>
</UL>
</BODY>
</HTML>