颜色描述#

The colordesc class holds the AI Vision Sensor Color Signatures. colordesc objects are used to create codedesc class objects or used directly with the aivision class. Up to seven Color Signatures can be stored at once.

使用以下构造函数创建颜色签名:

The colordesc(index, red, green, blue, hangle, hdsat) constructor uses six parameters:

范围

描述

index

The colordesc object’s index, from 1 - 7. Note: Creating two colordesc objects with the same index number will cause the second created object to override the first.

red

RGB 颜色代码中的红色值。

green

RGB 颜色代码中的绿色值。

blue

RGB 颜色代码中的蓝色值。

hangle

与该颜色特征匹配的允许色调范围将被检测为从 1 到 40。

hdsat

与此颜色特征匹配的允许饱和度范围将被检测为从 0.10 到 1.00。

// Create a new Color Signature "Red" with the Colordesc class.
aivision::colordesc Red = aivision::colordesc(1, 207, 19, 25, 10.00, 0.20);

By default, the ALL_COLORS tag will return all colordesc objects with the AI Vision Sensor.