Click or drag to resize
Accord.NET (logo)

SISThresholdCalculateThreshold Method (BitmapData, Rectangle)

Calculate binarization threshold for the given image.

Namespace:  Accord.Imaging.Filters
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax
public int CalculateThreshold(
	BitmapData image,
	Rectangle rect
)
Request Example View Source

Parameters

image
Type: System.Drawing.ImagingBitmapData
Image to calculate binarization threshold for.
rect
Type: System.DrawingRectangle
Rectangle to calculate binarization threshold for.

Return Value

Type: Int32
Returns binarization threshold.
Exceptions
ExceptionCondition
UnsupportedImageFormatExceptionSource pixel format is not supported by the routine. It should be 8 bpp grayscale (indexed) image.
Remarks

The method is used to calculate binarization threshold only. The threshold later may be applied to the image using Threshold image processing filter.

See Also