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