1Pgmkernel User Manual(0) Pgmkernel User Manual(0)
2
3
4
5Table Contents ⟨#index⟩
6
7
9 pgmkernel - generate a convolution kernel
10
11
13 pgmkernel [-weight w] width [height ]
14
15
17 This program is part of Netpbm(1).
18
19 pgmkernel generates a convolution kernel that you can use with pnmcon‐
20 vol. The kernel is one where the weight of each location is inversely
21 proportional to its distance from the center of the kernel.
22
23 pgmkernel generates a PGM image of size width by height (or width by
24 width if you don't specify height.
25
26 pgmkernel computes the convolution function K as follows.
27
28 K(i,j) = 1 / ( 1 + w * sqrt(i^2 + j^2))
29
30 where w is a coefficient specified via the -weight option. i and j are
31 measured in pixels. K is zero everywhere beyond the specified kernel
32 width and height.
33
34 pgmkernel generates the output PGM file in the Plain (text) variation
35 of PGM.
36
37
39 The optional -weight value should be a real number greater than -1.
40 The default value is 6.0.
41
42
44 The computation time is proportional to width*height. This increases
45 rapidly with the increase of the kernel size. A better approach could
46 be using a FFT in these cases.
47
48
50 pnmconvol(1), pnmsmooth(1) pamgauss(1) pgm(1)
51
52
53
55 Alberto Accomazzi (alberto@cfa.harvard.edu).
56
57
58
59netpbm documentation 10 December 1992 Pgmkernel User Manual(0)