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

NAME

6       pgmkernel - generate a convolution kernel
7
8

SYNOPSIS

10       pgmkernel [-weight=number] [-maxval=] {size | width height}
11
12       Minimum  unique abbreviation of option is acceptable.  You may use dou‐
13       ble hyphens instead of single hyphen to denote options.   You  may  use
14       white space in place of the equals sign to separate an option name from
15       its value.
16
17
18

DESCRIPTION

20       This program is part of Netpbm(1).
21
22       pgmkernel generates a convolution kernel that you can use with  pnmcon‐
23       vol.   The kernel is one where the weight of each location is inversely
24       proportional to its distance from the center of the kernel.
25
26       pgmkernel generates a PGM image of width and height size if you specify
27       one argument, or width width and height height if you specify two argu‐
28       ments.
29
30       pgmkernel computes the convolution function K as follows.
31
32              K(i,j) = 1 / ( 1 + w * sqrt(i^2 + j^2))
33
34       where w is a coefficient specified via the -weight option.  i and j are
35       measured  in  pixels.  K is zero everywhere beyond the specified kernel
36       width and height.
37
38       The sample values in the PGM output have this value scaled  and  biased
39       using  the  protocol pnmconvol specifies for representing the real num‐
40       bers K in PGM.
41
42
43

OPTIONS

45       In addition to the options common to all programs  based  on  libnetpbm
46       (most notably -quiet, see
47        Common  Options ⟨index.html#commonoptions⟩ ), pgmkernel recognizes the
48       following command line options:
49
50
51
52       -weight=number
53              The distance from the center is weighted by this; a higher  num‐
54              ber  means  the value falls off more quickly as you go away from
55              the center.
56
57              This must be a positive real number.
58
59              The default is 6.0.
60
61
62       -maxval=maxval
63              The maxval for the PGM kernel.
64
65              Default is 255.
66
67              This option was new in Netpbm  10.65  (December  2013).   Before
68              that, the maxval is always 255.
69
70
71
72
73

LIMITATIONS

75       The  computation  time is proportional to width*height.  This increases
76       rapidly with the increase of the kernel size.  A better approach  could
77       be using a FFT in these cases.
78
79

HISTORY

81       Before  Netpbm  10.65  (December  2013), the output was always in Plain
82       (text) PGM format.  (Now, like standard Netpbm programs, the default is
83       raw PGM and you can get Plain PGM with a -plain option).
84
85       Before  Netpbm  10.65 (December 2013), this manual said negative values
86       for -weight were valid (as long as they were greater than  -1.0).   But
87       the  program never worked with negative numbers and it isn't clear that
88       the result would be useful, so -weight is now required to  be  nonnega‐
89       tive and the program fails gracefully if you specify a negative value.
90
91

SEE ALSO

93       pnmconvol(1), pnmsmooth(1) pamgauss(1) pgm(1)
94
95
96

AUTHOR

98       Alberto Accomazzi (alberto@cfa.harvard.edu).
99

DOCUMENT SOURCE

101       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
102       source.  The master documentation is at
103
104              http://netpbm.sourceforge.net/doc/pgmkernel.html
105
106netpbm documentation           19 December 2013       Pgmkernel User Manual(0)
Impressum