Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 126.96.36.199 (188.8.131.52)
public class SISThreshold : BaseInPlacePartialFilter
The filter performs image thresholding calculating threshold automatically using simple image statistics method. For each pixel:
- two gradients are calculated - ex = |I(x + 1, y) - I(x - 1, y)| and |I(x, y + 1) - I(x, y - 1)|;
- weight is calculated as maximum of two gradients;
- sum of weights is updated (weightTotal += weight);
- sum of weighted pixel values is updated (total += weight * I(x, y)).
The filter accepts 8 bpp grayscale images for processing.
// create filter SISThreshold filter = new SISThreshold( ); // apply the filter filter.ApplyInPlace( image );
Result image (calculated threshold is 127):