ThresholdColor属性

适用
视觉对象:Blob, Contour, ImageOp

说明
设定或返回灰度值在ThresholdHigh和ThresholdLow之间的像素颜色。

用法

VGet  Sequence.Object.ThresholdColor, var
VSet  Sequence.Object.ThresholdColor, value
Sequence
序列名或表示序列名的字符串变量
Object
对象名或表示对象名的字符串变量对象必须存在于指定的序列中。
var
表示属性值的整数变量
value
表示新属性值的整数或表达式


  • 1 - Black
    • 视觉常数:VISION_THRESHCOLOR_BLACK
    • 黑色
  • 2 - White
    • 视觉常数:VISION_THRESHCOLOR_WHITE
    • 白色

默认:1 - Black

详细说明
ThresholdColor属性定义二值化时灰度值在ThresholdHigh和ThresholdLow之间的像素颜色。例如,ThresholdColor = 黑色、ThresholdLow = 50、ThresholdHigh = 100时,二值化时灰度值在50和100之间的像素设为黑色。所有其他像素设为白色。

参照
Blob对象、Contour对象、ImageOp对象、Polarity属性、ThresholdHigh、ThresholdLow属性