codedesc#
The codedesc class holds the AI Vision Sensor Color Codes. A codedesc object can not be created unless two colordesc
objects have already been created. Up to five Color Codes can be stored at once, and each Color Code can have up to five Color Signatures in them.
A Color Code is created by using the following constructor:
The codedesc(index, c1, c2, c3, c4, c5)
constructor creates a codedesc object with at least 2 but up to 5 colordesc objects.
Parameter |
Description |
---|---|
|
The |
|
The name of the first |
|
The name of the second |
|
Optional. The name of the third |
|
Optional. The name of the fourth |
|
Optional. The name of the fifth |
// Create a new Color Signature "Red" with the Colordesc class.
aivision::colordesc Red = aivision::colordesc(1, 207, 19, 25, 10.00, 0.20);
// Create a new Color Signature "Purple" with the Colordesc class.
aivision::colordesc Purple = aivision::colordesc(2, 98, 18, 227, 10.00, 0.20);
// Create a new Color Code "redPurple" with the Codedesc class.
aivision::codedesc redPurple = aivision::codedesc(1, Red, Purple);
By default, the ALL_CODES
tag will return all codedesc objects with the AI Vision Sensor.