ImgAutoThreshold
Previous  Top  Next

Prototype

intThresholdUsed:=ImgAutoThreshold (intImageHandle, intThresholdMethod)

Description

It threshold an image auto calculating the best threshold level. The threshold level is global and can be calculated using severla algorithms.

Parameters

intImageHandle: integer value corresponding to the image handle.
intThresholdMethod: it specifies thresholding algorithm. Allowed values are:
' 0 ' = Otsu
' 1' = Lloyd
' 2 ' = Ridler-Calvard
' 3 ' = Uniform Error
' 4 ' = Standard Deviation

Returned value

The auto calculated threshold value, in range 0 - 255, used for binarization.

Note

See ImgThreshold, ImgAdvancedThreshold and ImgDynamicThreshold for alternative threshold methods.

Example

//It applies autothresholding using Lloyd algo
ImgAutoThreshold(_CurrentImage,1);