Back to Adaptive Vision Studio website
You are here: Start » Filter Reference » Image Thresholding » SelectThresholdValue
Selects best threshold value using the image histogram.
Name | Type | Description | |
---|---|---|---|
inImage | Image | Input image | |
inRoi | Region* | Range of pixels to be processed | |
inMethod | ThresholdSelectionMethod | Method used to select the best threshold | |
outThresholdValue | Real | Best threshold separating background pixels from foreground pixels | |
diagThresholdRatings | RealArray | Contains ratings gained if that threshold would be chosen | |
diagBackgroundPixelsFraction | RealArray | Fraction of pixels that are darker than the index value | |
diagForegroundPixelsFraction | RealArray | Fraction of pixels that are brighter than the index value |
Only the following inImage pixel formats are supported: uint8
Applications
Usually used before a thresholding filter when the image brightness is variable. Use with care.
Description
The operation estimates an intensity threshold value that discriminates foreground pixels from background pixels in inImage.
Note that to provide meaningful results it is required that the image in fact consists of foreground and background components that strongly differ in brightness.
Hints
- Choose inMethod that works best in your application. None of the methods is perfect, but ClusteringOtsu is the most universal one.
Examples
Complexity Level
This filter is available on Advanced Complexity Level.