Image Morphology

Morphological operators are tools that affect the shape and boundaries of regions in the image. The typical morphological operation involves a gray-scale (8-bits) or binary image and a structure element. When working with 2D images, the structure element is a 2D array which is usually much smaller in size than the image. When working with 3D data, the structure element is also a 3D array. There are 25 built-in structure elements for use in 2D and 3D morphology operations. You can also provide your own structure element.

ImageMorphology supports the following operations

ImageMorphology operators
BinaryErosion Performs an erosion of the source binary image using a built-in or user specified structure element.
BinaryDilation Performs a dilation of the source binary image using a built-in or user specified structure element.
Closing Performs the closing operation (dilation followed by erosion). The same structure element is used in both erosion and dilation. Note that this operation is an idempotent which means that there is no point of executing it more than once.
Dilation Performs a dilation of the source gray scale image using either a built-in structure element or a user specified structure element. The operation supports only 8-bit gray images.
Erosion Performs an erosion of the source gray scale image using either a built-in structure element or a user-specified structure element. The operation supports only 8-bit gray images.
Opening Performs an opening operation (erosion followed by dilation). The same structure element is used in both erosion and dilation. Note that this operation is an idempotent which means that there is no point of executing it more than once.
TopHat Calculates the difference between the eroded image and dilated image using the same structure element.
Watershed Calculates the watershed regions for gray-scale or binary image. Use the /N flag to mark all non-watershed lines as NaNs.