Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 220.127.116.11 (18.104.22.168)
public class Erosion : BaseUsingCopyPartialFilter
The filter assigns minimum value of surrounding pixels to each pixel of the result image. Surrounding pixels, which should be processed, are specified by structuring element: 1 - to process the neighbor, -1 - to skip it.
The filter especially useful for binary image processing, where it removes pixels, which are not surrounded by specified amount of neighbors. It gives ability to remove noisy pixels (stand-alone pixels) or shrink objects.
The filter accepts 8 and 16 bpp grayscale images and 24 and 48 bpp color images for processing.
// create filter Erosion filter = new Erosion( ); // apply the filter filter.Apply( image );