pgmminkowski computes the Minkowski integral over a PGM image. This is a topological measure of the image, which means that it is very robust under all sorts of deformations. On top of that it is very easy to calculate quickly. This makes it of interest for some kinds of pattern recognition. For more info, see e.g. K. Michielsen and H. De Raedt, "Integral-Geometry Morphological Image Analysis", Phys. Rep. 347, 461-538 (2001).
The -open option does an erode and then a dilate. The -close option does a dilate and then an erode.
Based on work which is Copyright (C) 1989, 1991 by Jef Poskanzer.