Mathematical Morphology
Mathematical morphology is an approach to image processing that is based on shape. If mathematical morphology is used appropriately, image data can be simplified without losing essential shape characteristics. It plays a particularly important role in those image processing applications that depend on object or feature recognition. For example, some manufacturing defects correlate directly with shape and can be discovered with this approach to image processing.
Mathematical morphology is based on set theory; sets represent the various shapes that are manifested on binary or gray scale images. Dilation is the morphological transformation that combines two sets using vector addition of set elements. It is implemented with the DILATE function. The dilation operator is commonly known as the “fill,” “expand,” or “grow” operator. It is used to fill “holes” in the image that are equal to or smaller in size than a particular structuring element.
Erosion is the morphological opposite of dilation. It is the morphological transformation that combines two sets using the vector subtraction of set elements. Erosion is implemented with the ERODE function. The erosion operator is commonly known as the “shrink” or “reduce” operator. It is used to reduce islands smaller than a particular structuring element.
Complete descriptions of the DILATE and ERODE functions are given in the PV‑WAVE Reference. Additional information on mathematical morphology in general can be found in the article “Image Analysis Using Mathematical Morphology” by Haralick, Sternberg, and Zhuang, found in the IEEE Transaction on Pattern Analysis and Machine Intelligence, Vol. PAMI-9, No.4, July, 1987.