代码#
The code class holds the Vision Sensor Codes. code objects are used directly with the vision class. Up to five Codes can be stored at once.
使用以下构造函数创建 Code:
code(sig1, sig2, sig3, sig4, sig5)
此构造函数使用六个参数:
范围 |
描述 |
|---|---|
|
A previously created |
|
A previously created |
|
Optional. A previously created |
|
Optional. A previously created |
|
Optional. A previously created |
// Create a new Signature "darkBlue" with the signature class.
vision::signature darkBlue = vision::signature(1, -3911, -3435, -3673,10879, 11421, 11150,2.5, 0);
// Create a new Signature "pink" with the Signature class.
vision::signature pink = vision::signature(2, 8211, 8481, 8346,4953, 5271, 5112,2.5, 0);
// Create a new Code "pink_darkBlue with the code class.
code pink_darkBlue = code(pink, darkBlue);