VEX IQ C++ API
|
Use this class when programming the vision sensor. More...
Inherits vex::device.
Classes | |
class | code |
Use this class when programming the vision sensor. More... | |
class | object |
The object class represents an object that the vision sensor detects. More... | |
class | signature |
Use this class when programming the vision sensor. More... | |
Public Member Functions | |
vision (int32_t index) | |
Creates a new vision object on the port specified. More... | |
~vision () | |
template<typename... Args> | |
vision (int32_t index, uint8_t bright, Args... sigs) | |
Creates a new vision object on the port specified. Sets the brightness setting and all of the vision objects settings. More... | |
int32_t | takeSnapshot (uint32_t id) |
Takes a data sample from the vision sensor. More... | |
int32_t | takeSnapshot (code &cc) |
Takes a data sample from the vision sensor. More... | |
int32_t | takeSnapshot (signature &sig) |
Takes a data sample from the vision sensor. More... | |
int32_t | takeSnapshot (uint32_t id, uint32_t count) |
Takes a data sample from the vision sensor, and only stores the largest samples of the specified amount. More... | |
int32_t | takeSnapshot (code &cc, uint32_t count) |
Takes a data sample from the vision sensor, and only stores the largest samples of the specified amount. More... | |
int32_t | takeSnapshot (signature &sig, uint32_t count) |
Takes a data sample from the vision sensor, and only stores the largest samples of the specified amount. More... | |
bool | setSignature (signature &sig) |
bool | setBrightness (uint8_t value) |
![]() | |
device (int32_t index) | |
~device () | |
Public Attributes | |
int32_t | objectCount |
The ammount of objects found in the data sample. More... | |
object | largestObject |
The largest object found in the data sample. More... | |
safearray< object, VISION_MAX_OBJECTS > | objects |
An array containing the largest object(s) found in the data sample. More... | |
Additional Inherited Members | |
![]() | |
int32_t | _index |
Use this class when programming the vision sensor.
The vision sensor has a resolution of 316x212 pixels
vex::vision::vision | ( | int32_t | index | ) |
Creates a new vision object on the port specified.
index | The port index for this vision. The index is zero-based. |
vex::vision::~vision | ( | ) |
|
inline |
Creates a new vision object on the port specified. Sets the brightness setting and all of the vision objects settings.
index | The port index for this vision. The index is zero-based. |
bright | The vision sensor brightness setting. Values are 0 to 255 |
sigs | List of signature objects used to setup the detection signatures for this sensor. |
int32_t vex::vision::takeSnapshot | ( | uint32_t | id | ) |
Takes a data sample from the vision sensor.
id | The ID of the object to look for. |
int32_t vex::vision::takeSnapshot | ( | code & | cc | ) |
Takes a data sample from the vision sensor.
cc | The code signature of the object to look for. |
int32_t vex::vision::takeSnapshot | ( | signature & | sig | ) |
Takes a data sample from the vision sensor.
sig | The signature of the object to look for. |
int32_t vex::vision::takeSnapshot | ( | uint32_t | id, |
uint32_t | count | ||
) |
Takes a data sample from the vision sensor, and only stores the largest samples of the specified amount.
id | The ID of the object to look for. |
count | the amount of objects to look for. The largest of the object will be returned. |
int32_t vex::vision::takeSnapshot | ( | code & | cc, |
uint32_t | count | ||
) |
Takes a data sample from the vision sensor, and only stores the largest samples of the specified amount.
cc | The code signature of the object to look for. |
count | the amount of objects to look for. The largest of the object will be returned. |
int32_t vex::vision::takeSnapshot | ( | signature & | sig, |
uint32_t | count | ||
) |
Takes a data sample from the vision sensor, and only stores the largest samples of the specified amount.
sig | The signature of the object to look for. |
count | the amount of objects to look for. The largest of the object will be returned. |
bool vex::vision::setSignature | ( | signature & | sig | ) |
bool vex::vision::setBrightness | ( | uint8_t | value | ) |
int32_t vex::vision::objectCount |
The ammount of objects found in the data sample.
object vex::vision::largestObject |
The largest object found in the data sample.
safearray< object, VISION_MAX_OBJECTS > vex::vision::objects |
An array containing the largest object(s) found in the data sample.