Colordesc#
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.
A Color Signature is created by using the following constructor:
Colordesc(index, red, green, blue, hangle, hdsat)
This constructor uses six parameters:
Parameter |
Description |
---|---|
|
The |
|
The red value in the RGB color code. |
|
The green value in the RGB color code. |
|
The blue value in the RGB color code. |
|
The range of the allowable hue that will be detected as matching this Color Signature, from 1 - 40. |
|
The range of the allowable saturation that will be detected as matching this Color Signature, from 0.10 to 1.00. |
# Create a new Color Signature "red" with the Colordesc class.
red = 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.