.TL Pgmmorphconv User Manual .SH 1 pgmmorphconv .LP Updated: 29 October 2002 .br Table Of Contents .SH 2 NAME .LP pgmmorphconv - perform morphological convolutions: dilation, erosion .SH 2 SYNOPSIS .LP \fBpgmmorphconv\fR [ \fB-erode\fR | \fB-dilate\fR | \fB-open\fR | \fB-close\fR ] \fItemplatefile\fR [\fIpgmfile\fR] .LP 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. .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpgmmorphconv\fR performs morphological convolutions on a PGM image: dilation and erosion. .LP \fBpgmmorphconv\fR performs a "topological" convolution. For each pixel of the input, \fBpgmmorphconv\fR generates an output pixel in the same position. To determine the intensity of the output pixel, \fBpgmmorphconv\fR lays the template image over the input image such that the middle pixel of the template is over the input pixel in question. \fBpgmmorphconv\fR 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. .LP 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. .LP The template file named by \fItemplatefile\fR 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. .LP This is similar to the continuous convolution done by \fBpnmconvol\fR, except that with \fBpnmconvol\fR the output intensity is a weighted average of nearby input pixels instead of a minimum or maximum. .LP 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. .LP The options \fB-erode\fR and \fB-dilate\fR obviously produce an erosion or dilation, respectively. .LP The \fB-open\fR option causes \fBpgmmorphconv\fR to perform first an erode and then a dilate operation. The \fB-close\fR option causes a dilate first and then an erode. If you specify none of these options, it is the same as \fB-dilate\fR. .SH 2 SEE ALSO .LP .IP \(bu \fBpgmminkowski\fR .IP \(bu \fBpnmconvol\fR .IP \(bu \fBpgm\fR .LP .LP For more information about morphological convolutions, see e.g. .IP \(bu K. Michielsen and H. De Raedt, "Integral-Geometry Morphological Image Analysis",� Phys. Rep. 347, 461-538 (2001). .IP \(bu 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) .LP .SH 2 AUTHORS .LP Luuk van Dijk, 2001. .LP Based on work which is Copyright (C) 1989, 1991 by Jef Poskanzer. .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu SEE ALSO .IP \(bu AUTHORS .LP