Adaptive thresholding using the internal image.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class BradleyLocalThresholding : BaseInPlaceFilter

Remarks

The image processing routine implements local thresholding technique described by Derek Bradley and Gerhard Roth in the "Adaptive Thresholding Using the Integral Image" paper.

The brief idea of the algorithm is that every image's pixel is set to black if its brightness is t percent lower (see PixelBrightnessDifferenceLimit) than the average brightness of surrounding pixels in the window of the specified size (see WindowSize), othwerwise it is set to white.

Sample usage:

CopyC#
// create the filter
BradleyLocalThresholding filter = new BradleyLocalThresholding( );
// apply the filter
filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance Hierarchy

System..::.Object
  AForge.Imaging.Filters..::.BaseInPlaceFilter
    AForge.Imaging.Filters..::.BradleyLocalThresholding

See Also