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

NAME

6       pgmmorphconv - perform morphological convolutions: dilation, erosion
7
8

SYNOPSIS

10       pgmmorphconv [
11        -erode |
12        -dilate |
13        -open |
14        -close |
15        -gradient ] templatefile [pgmfile]
16
17       Minimum  unique abbreviation of option is acceptable.  You may use dou‐
18       ble hyphens instead of single hyphen to denote options.   You  may  use
19       white space in place of the equals sign to separate an option name from
20       its value.
21
22

DESCRIPTION

24       This program is part of Netpbm(1).
25
26       pgmmorphconv performs morphological convolutions on a PGM image:  dila‐
27       tion and erosion.
28
29       pgmmorphconv  performs  a "topological" convolution.  For each pixel of
30       the input, pgmmorphconv generates an output pixel in the same position.
31       To  determine  the intensity of the output pixel, pgmmorphconv lays the
32       template image over the input image such that the middle pixel  of  the
33       template  is  over  the input pixel in question.  pgmmorphconv looks at
34       the input pixels underneath each white pixel in the  template.   For  a
35       dilation, the maximum intensity of all those pixels is the intensity of
36       the output pixel.  For an erosion, it is the minimum.
37
38       Thus, the dilation effect is that bright areas of the input get  bigger
39       and  dark areas smaller.  The erosion effect is the opposite.  The sim‐
40       plest template image would be one with a white pixel in the middle  and
41       the  rest  black.   This would produce an output image identical to the
42       input.  Another simple template image is a fully  white  square.   This
43       causes  bright  or  dark areas to expand in all directions.  A template
44       image that is white on the left side and black on the right would smear
45       the image to the right.
46
47       The  template file named by templatefile contains the template image as
48       a PBM image.  It must have an odd number of rows and an odd  number  of
49       columns, so there is a definite middle pixel.  It must contain at least
50       one white pixel.
51
52       This is similar to the continuous convolution done by pnmconvol, except
53       that  with  pnmconvol  the  output  intensity  is a weighted average of
54       nearby input pixels instead of a minimum or maximum.
55
56       This convolution changes the three Minkowski integrals in a  predefined
57       way, and can be used to filter an image to enhance certain features, to
58       ease their automatic recognition.
59
60

OPTIONS

62       In addition to the options common to all programs  based  on  libnetpbm
63       (most notably -quiet, see
64        Common  Options  ⟨index.html#commonoptions⟩ ), pgmmorphconv recognizes
65       the following command line options:
66
67       The options -erode and -dilate obviously produce an  erosion  or  dila‐
68       tion, respectively.
69
70       The -open option causes pgmmorphconv to perform first an erode and then
71       a dilate operation.  The -close option causes a dilate first  and  then
72       an erode.  If you specify none of these options, it is the same as -di‐
73       late.
74
75       With -gradient, pgmmorphconv produces an image which is the  difference
76       between  the  eroded image and the dilated image.  -gradient was new in
77       Netpbm 10.70 (March 2015).
78
79

SEE ALSO

81
82
83              pgmminkowski(1)
84
85
86
87              pnmconvol(1)
88
89
90
91              pgm(1)
92
93
94       For more information about morphological convolutions, see e.g.
95
96
97
98
99               J.S. Kole, K. Michielsen, and H. De Raedt, "Morphological Image
100              Analysis  of  Quantum  Motion  in  Billiards",  Phys. Rev. E 63,
101              016201-1             -              016201-7              (2001)
102http://rugth30.phys.rug.nl/pdf/prechaos.pdf
103
104       •      K.  Michielsen and H. De Raedt, "Integral-Geometry Morphological
105              Image Analysis", Phys. Rep. 347, 461-538 (2001).
106
107
108
109
110

AUTHORS

112       Luuk van Dijk, 2001.
113
114       Based on work which is Copyright (C) 1989, 1991 by Jef Poskanzer.
115

DOCUMENT SOURCE

117       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
118       source.  The master documentation is at
119
120              http://netpbm.sourceforge.net/doc/pgmmorphconv.html
121
122netpbm documentation             29 March 2015     Pgmmorphconv User Manual(0)
Impressum