1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it! If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pgmmorphconv User Manual" 0 "29 March 2015" "netpbm documentation"
.SH NAME
pgmmorphconv - perform morphological convolutions: dilation, erosion
.UN synopsis
.SH SYNOPSIS
\fBpgmmorphconv\fP
[
\fB-erode\fP |
\fB-dilate\fP |
\fB-open\fP |
\fB-close\fP |
\fB-gradient\fP
]
\fItemplatefile\fP
[\fIpgmfile\fP]
.PP
Minimum unique abbreviation of option is acceptable. You may use
double hyphens instead of single hyphen to denote options. You may use
white space in place of the equals sign to separate an option name
from its value.
.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpgmmorphconv\fP performs morphological convolutions on a
PGM image: dilation and erosion.
.PP
\fBpgmmorphconv\fP performs a "topological" convolution. For each
pixel of the input, \fBpgmmorphconv\fP generates an output pixel in
the same position. To determine the intensity of the output pixel,
\fBpgmmorphconv\fP lays the template image over the input image such
that the middle pixel of the template is over the input pixel in
question. \fBpgmmorphconv\fP looks at the input pixels underneath each
white pixel in the template. For a dilation, the maximum intensity of
all those pixels is the intensity of the output pixel. For an erosion,
it is the minimum.
.PP
Thus, the dilation effect is that bright areas of the input get bigger
and dark areas smaller. The erosion effect is the opposite. The simplest
template image would be one with a white pixel in the middle and the rest
black. This would produce an output image identical to the input. Another
simple template image is a fully white square. This causes bright or dark
areas to expand in all directions. A template image that is white on the
left side and black on the right would smear the image to the right.
.PP
The template file named by \fItemplatefile\fP contains the
template image as a PBM image. It must have an odd number of rows and
an odd number of columns, so there is a definite middle pixel. It
must contain at least one white pixel.
.PP
This is similar to the continuous convolution done by
\fBpnmconvol\fP, except that with \fBpnmconvol\fP the output intensity is
a weighted average of nearby input pixels instead of a minimum or maximum.
.PP
This convolution changes the three Minkowski integrals in a predefined
way, and can be used to filter an image to enhance certain features, to
ease their automatic recognition.
.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see
.UR index.html#commonoptions
Common Options
.UE
\&), \fBpgmmorphconv\fP recognizes the following
command line options:
.PP
The options \fB-erode\fP and \fB-dilate\fP obviously produce an
erosion or dilation, respectively.
.PP
The \fB-open\fP option causes
\fBpgmmorphconv\fP to perform first an erode and then a dilate
operation. The \fB-close\fP option causes a dilate first and then an
erode. If you specify none of these options, it is the same as
\fB-dilate\fP.
.PP
With \fB-gradient\fP, \fBpgmmorphconv\fP produces an image which is the
difference between the eroded image and the dilated image. \fB-gradient\fP
was new in Netpbm 10.70 (March 2015).
.UN seealso
.SH SEE ALSO
.IP \(bu
.BR "pgmminkowski" (1)\c
\&
.IP \(bu
.BR "pnmconvol" (1)\c
\&
.IP \(bu
.BR "pgm" (1)\c
\&
.PP
For more information about morphological convolutions, see e.g.
.IP \(bu
.UR http://rugth30.phys.rug.nl/pdf/prechaos.pdf
J.S. Kole, K. Michielsen, and H. De Raedt, "Morphological Image Analysis of Quantum Motion in Billiards", Phys. Rev. E 63, 016201-1 - 016201-7 (2001)
.UE
\&
.IP \(bu
K. Michielsen and
H. De Raedt, "Integral-Geometry Morphological Image Analysis",
Phys. Rep. 347, 461-538 (2001).
.UN authors
.SH AUTHORS
Luuk van Dijk, 2001.
.PP
Based on work which is Copyright (C) 1989, 1991 by Jef Poskanzer.
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source. The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pgmmorphconv.html
.PP
|