|
IterativeThresholdCalculateThreshold Method (UnmanagedImage, Rectangle)
|
Calculate binarization threshold for the given image.
Namespace:
Accord.Imaging.Filters
Assembly:
Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntaxpublic int CalculateThreshold(
UnmanagedImage image,
Rectangle rect
)
Public Function CalculateThreshold (
image As UnmanagedImage,
rect As Rectangle
) As Integer
Request Example
View SourceParameters
- image
- Type: Accord.ImagingUnmanagedImage
Image to calculate binarization threshold for. - rect
- Type: System.DrawingRectangle
Rectangle to calculate binarization threshold for.
Return Value
Type:
Int32Returns binarization threshold.
ExceptionsException | Condition |
---|
UnsupportedImageFormatException | Source pixel format is not supported by the routine. It should
8 bpp grayscale (indexed) or 16 bpp grayscale image. |
RemarksThe method is used to calculate binarization threshold only. The threshold
later may be applied to the image using Threshold image processing filter.
See Also