Fill holes in objects in binary image.Namespace: AForge.Imaging.Filters
Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 126.96.36.199 (188.8.131.52)
public class FillHoles : BaseInPlaceFilter
The filter accepts binary image only, which are represented as 8 bpp images.
// create and configure the filter FillHoles filter = new FillHoles( ); filter.MaxHoleHeight = 20; filter.MaxHoleWidth = 20; filter.CoupledSizeFiltering = false; // apply the filter Bitmap result = filter.Apply( image );