Fill holes in objects in binary image.Namespace: AForge.Imaging.Filters
Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 184.108.40.206 (220.127.116.11)
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 );