1Pamgauss User Manual(0)                                Pamgauss User Manual(0)
2
3
4

NAME

6       pamgauss - create a two-dimensional Gaussian function as a PAM image
7
8

SYNOPSIS

10       pamgauss   width   height   -sigma=number   [-maxval=number]   [-tuple‐
11       type=string] [-maximize] [-oversample=number]
12
13       Minimum unique abbreviation of option is acceptable.  You may use  dou‐
14       ble  hyphens  instead  of single hyphen to denote options.  You may use
15       white space in place of the equals sign to separate an option name from
16       its value.
17
18
19

EXAMPLES

21            pamgauss 7 7 -sigma=.5 -maximize -tupletype=GRAYSCALE | pamtopnm >gauss.pgm
22            pnmconvol -nooffset -normalize gauss.pgm myimage.ppm >blurred.ppm
23
24

DESCRIPTION

26       This program is part of Netpbm(1).
27
28       pamgauss  generates  a one-plane PAM image whose samples are a Gaussian
29       function of their distance from the center of  the  image.   I.e.   the
30       sample  value  is  highest in the center and goes down, in a bell curve
31       shape, as you move away from the center.
32
33       You can use this image as a convolution kernel with pnmconvol  to  blur
34       an image.  (This technique is known as Gaussian blurring).
35
36       width  and  height are the dimensions of the image that pamgauss gener‐
37       ates.  Mathematically speaking, they are the domain of  the  two-dimen‐
38       sional  Gaussian  function.   If  you  want  to be sure you get a whole
39       Gaussian function, make sure that you choose a standard  deviation  and
40       image  dimensions  so that if you made it any larger, the sample values
41       at the edges would be zero.
42
43       The output image is PAM.  To make it  usable  with  pnmconvol,  specify
44       -tupletype=GRAYSCALE  so  pnmconvol  can use it as if it were PGM.  You
45       must use the -nooffset option on pnmconvol because zero means  zero  in
46       the PAM that pamgauss generates.
47
48       Without  -maximize,  the sum of all the samples is equal to the image's
49       maxval (within rounding error).  This is true  even  if  you  clip  the
50       Gaussian  function by making the image too small.  This is what is nor‐
51       mally required of a convolution kernel.
52
53       pamgauss oversamples and averages to represent the continuous  Gaussian
54       function  in  discrete samples in the PAM output.  Consider an image 11
55       samples wide and an oversampling factor of  10.   The  samples  can  be
56       thought  of  as  contiguous  squares  one unit wide.  The center of the
57       image is thus the center of the 6th sample from the left.  The 3rd sam‐
58       ple  from  the  left covers a range of distances from 3 to 4 units from
59       the center of the image.  Because the oversampling factor is  10,  pam‐
60       gauss  computes  the value of the Gaussian function at 10 points evenly
61       spaced between 3 and 4 units from the center of the image  and  assigns
62       the 3rd sample from the left the mean of those 10 values.
63
64
65

OPTIONS

67       -sigma=number
68              This  is  the  standard deviation of the Gaussian function.  The
69              higher the number, the more spread out the  function  is.   Nor‐
70              mally, you want to make this number low enough that the function
71              reaches zero value before the edge of your image.
72
73              number is in units of samples.
74
75              This option is required.  There is no default.
76
77
78       -maximize
79              Causes pamgauss to use the whole dynamic range available in  the
80              output PAM image by choosing an amplitude for the Gaussian func‐
81              tion that causes the maximum value in the image to be the maxval
82              of the image.
83
84              If  you  select  this, you probably want to normalize the output
85              (scale the samples down so the volume under the surface  of  the
86              two-dimensional  Gaussian function is the maxval) before you use
87              it, for example with pnmconvol's -normalize option.  The  reason
88              this  is  different  from  just not using -maximize is that this
89              subsequent normalization can be done with  much  more  precision
90              than can be represented in a PAM image.
91
92              Without  this  option, pamgauss uses an amplitude that makes the
93              volume under the surface of the two-dimensional  Gaussian  func‐
94              tion the maxval of the image.  This means all the samples in the
95              image are normally considerably less than the maxval.
96
97              This option was new in Netpbm 10.79 (June 2017).
98
99
100       -maxval=number
101              This is the maxval for the output image.  65535 is almost always
102              the best value to use.  But there may be some programs (not part
103              of Netpbm) that can't handle a maxval greater than 255.
104
105              The default is 255.
106
107
108       -tupletype=string
109              This is the value of the "tuple_type" attribute of  the  created
110              PAM image.  It can be any string up to 255 characters.
111
112              If you don't specify this, pamgauss generates a PAM with unspec‐
113              ified tuple type.
114
115
116       -oversample=number
117              This sets the oversampling factor.  pamgauss samples the  Gauss‐
118              ian  function this many times, both horizontally and vertically,
119              to get the value of each sample in the output.
120
121              An oversampling factor of 1 means no oversampling,  which  means
122              each  sample is based only on the value of the Gaussian function
123              at the center of the sample.
124
125              The default is 5 divided by the standard deviation,  rounded  up
126              to a whole number.
127
128              This  option  was new in Netpbm 10.79 (June 2017).  Before that,
129              it is essentially 1 - there is no oversampling.
130
131
132
133

SEE ALSO

135       pnmconvol(1), pamtopnm(1), pgmkernel(1), pamseq(1), pam(1)
136
137

HISTORY

139       pamgauss was new in Netpbm 10.23 (July 2004).
140

DOCUMENT SOURCE

142       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
143       source.  The master documentation is at
144
145              http://netpbm.sourceforge.net/doc/pamgauss.html
146
147netpbm documentation              18 May 2017          Pamgauss User Manual(0)
Impressum