1、binary_threshold
Halcon算子原型:
binary_threshold(Image : Region : Method, LightDark : UsedThreshold)
参数:
Image:需要进行阈值的图像
Region:处理后的区域
Method:分割方法(‘max_separability’:最大限度的可分性, ‘smooth_histo’:直方图平滑)
LightDark:提取的是黑色部分还是白色部分
UsedThreshold:自动阈值使用的阈值
该方法使用的分割阈值是由方法中给出的方法决定的。目前,操作符提供了以下两种方法:“max_separability”和“smooth_histo”。这两种方法都只能用于具有双峰直方图的图像。
2、threshold 固定阈值分割
threshold(Image : Region : MinGray:MaxGray)
3、var_threshold
var_threshold(Image : Region : MaskWidth, MaskHeight, StdDevScale, AbsThreshold, LightDark : )
Image:输入图像;
MaskWidth, MaskHeight:是用于滤波平滑的掩膜单元
Region:输出区域
StdDevscale:是标准差乘数因子(简称标准差因子) ;
AbsThreshold:是设定的绝对阈值;
LightDark:有4个值可选:’ light’、’ dark’’ equal’、’ not equal’
eg:
var threshold (Imag