1Pgmmorphconv User Manual(0) Pgmmorphconv User Manual(0)
2
3
4
6 pgmmorphconv - perform morphological convolutions: dilation, erosion
7
8
10 pgmmorphconv [ -erode | -dilate | -open | -close ] templatefile [pgm‐
11 file]
12
13 <H2 id="option_usage">OPTION USAGE</H2>
14
15 Minimum unique abbreviation of option is acceptable. You may use dou‐
16 ble hyphens instead of single hyphen to denote options. You may use
17 white space in place of the equals sign to separate an option name from
18 its value.
19
20
22 This program is part of Netpbm(1).
23
24 pgmmorphconv performs morphological convolutions on a PGM image: dila‐
25 tion and erosion.
26
27 pgmmorphconv performs a "topological" convolution. For each pixel of
28 the input, pgmmorphconv generates an output pixel in the same position.
29 To determine the intensity of the output pixel, pgmmorphconv lays the
30 template image over the input image such that the middle pixel of the
31 template is over the input pixel in question. pgmmorphconv looks at
32 the input pixels underneath each white pixel in the template. For a
33 dilation, the maximum intensity of all those pixels is the intensity of
34 the output pixel. For an erosion, it is the minimum.
35
36 Thus, the dilation effect is that bright areas of the input get bigger
37 and dark areas smaller. The erosion effect is the opposite. The sim‐
38 plest template image would be one with a white pixel in the middle and
39 the rest black. This would produce an output image identical to the
40 input. Another simple template image is a fully white square. This
41 causes bright or dark areas to expand in all directions. A template
42 image that is white on the left side and black on the right would smear
43 the image to the right.
44
45 The template file named by templatefile contains the template image as
46 a PBM image. It must have an odd number of rows and an odd number of
47 columns, so there is a definite middle pixel. It must contain at least
48 one white pixel.
49
50 This is similar to the continuous convolution done by pnmconvol, except
51 that with pnmconvol the output intensity is a weighted average of
52 nearby input pixels instead of a minimum or maximum.
53
54 This convolution changes the three Minkowski integrals in a predefined
55 way, and can be used to filter an image to enhance certain features, to
56 ease their automatic recognition.
57
58 The options -erode and -dilate obviously produce an erosion or dila‐
59 tion, respectively.
60
61 The -open option causes pgmmorphconv to perform first an erode and then
62 a dilate operation. The -close option causes a dilate first and then
63 an erode. If you specify none of these options, it is the same as
64 -dilate.
65
66
68 ·
69
70 pgmminkowski(1)
71
72 ·
73
74 pnmconvol(1)
75
76 ·
77
78 pgm(1)
79
80
81 For more information about morphological convolutions, see e.g.
82
83
84 ·
85
86 K. Michielsen and H. De Raedt, "Integral-Geometry Morphological
87 Image Analysis", Phys. Rep. 347, 461-538 (2001).
88 ⟨http://rugth30.phys.rug.nl/compphys0/2001.htm⟩
89
90
91 ·
92
93 J.S. Kole, K. Michielsen, and H. De Raedt, "Morphological Image
94 Analysis of Quantum Motion in Billiards", Phys. Rev. E 63,
95 016201-1 - 016201-7 (2001)
96 ⟨http://rugth30.phys.rug.nl/pdf/prechaos.pdf⟩
97
98
99
100
102 Luuk van Dijk, 2001.
103
104 Based on work which is Copyright (C) 1989, 1991 by Jef Poskanzer.
105
106
107
108netpbm documentation 29 October 2002 Pgmmorphconv User Manual(0)