Data Structures
Overview
- ReflexCameraUnit
- ReflexSystemStatus
- ReflexSensorStatus
- ReflexContour
- ReflexReflector
- ReflexObject
- ReflexData
- ReflexImageCV
ReflexCameraUnit
struct ReflexCameraUnit
{
std::string ip_address;
std::string serial_number;
int8_t type;
int8_t nb_systems;
int8_t nb_sensors;
int8_t sw_version_major;
int8_t sw_version_minor;
int8_t sw_version_patch;
};
The data structure ReflexCameraUnit stores information about a connected RefleX camera.
Members
- ip_address: the IP address of the camera unit
- serial_number: 10-digit serial number
- type: the camera model type
- nb_systems: the number of computational sub-systems inside the camera unit
- nb_sensors: the number of image sensors
- sw_version_major: software version (major)
- sw_version_minor: software version (minor)
- sw_version_patch: software version (patch)
ReflexSystemStatus
struct ReflexSystemStatus
{
double timestamp;
int8_t system_id;
float temperature;
int16_t error;
int8_t state;
};
The data structure holds status information about a sub-system of a camera unit.
Members
- timestamp: state of the system internal timer in seconds (reset to 0 at system start)
- system_id: ID of the sub-system
- temperature: processor temperature in °C
- error: error code of the current system state (see ReflexErrorTypes)
- state: current system operation state (see ReflexSystemStates)
ReflexSensorStatus
struct ReflexSensorStatus
{
double timestamp;
int8_t sensor_id;
int16_t error;
uint32_t frame_id;
float framerate;
int8_t exposure_mode;
uint32_t shutter;
float gain;
};
The data structure holds status information about a specific image sensor of a camera unit.
Members
- timestamp: state of the system internal timer (in seconds) at the last image capture (reset to 0 at every system start)
- sensor_id: ID of the image sensor
- error: error code of the image sensor (see ReflexErrorTypes)
- frame_id: frame number of the last image capture
- framerate: current frame rate in frames per second
- exposure_mode: exposure mode (see ReflexSensorExposureModes)
- shutter: exposure time in microseconds
- gain: sensor gain
ReflexContour
struct ReflexContour
{
std::vector<int16_t> x;
std::vector<int16_t> y;
};
The data structure holds the x/y-coordinates of a 2D contour in image space.
Members
- x: vector of x-coordinates
- y: vector of y-coordinates
ReflexReflector
struct ReflexReflector
{
ReflexContour contour;
float pos2d[2];
float pos3d[3];
float area;
float circularity;
float score;
};
The data structure holds information about a detected reflective object.
Members
- contour: contour in 2D image coordinates
- pos2d: centroid position in 2D image coordinates
- pos3d: estimated centroid position in 3D world coordinates relative to the camera
- area: number of pixels delimited by the reflector's contour
- circularity: reflector circularity computed as
4 * PI * AREA / PERIMETER2
- score: classifier score in the case where reflector classification is activated.
A higher score indicates a higher confidence that the reflector belongs to the positive class of a 2-class classification problem.
ReflexObject
struct ReflexObject
{
float pos2d[2];
float pos3d[3];
float vel3d[3];
float score;
int16_t id;
uint32_t lifetime;
};
The data structure holds information about a reflective object tracked over consecutive image frames.
Members
- pos2d: centroid position in 2D image coordinates
- pos3d: centroid position in 3D world coordinates relative to the camera
- vel3d: estimated object velocity in m/s in 3D world coordinates relative to the camera
- score: aggregated classifier score in the case where reflector classification is activated.
A higher score indicates a higher confidence that the reflector belongs to the positive class of a 2-class classification problem. Classifier scores of individual reflectors associated with a tracked object are aggregated over consecutive frames. - id: object ID
- lifetime: number of frames over which the object has been tracked
ReflexData
struct ReflexData
{
double timestamp;
float framerate;
int16_t error;
uint32_t frame_id;
std::vector<ReflexReflector> reflectors;
std::vector<ReflexObject> objects;
};
The data structure holds data extracted from a captured image frame.
Members
- timestamp: system internal time of the image capture from which the data package has been extracted
- framerate: current detector frame rate in frames per second
- error: error code of the detector (see ReflexErrorTypes)
- frame_id: image frame number from which the data was extracted
- reflectors: vector of reflectors extracted in the current frame (see ReflexReflector)
- objects: vector of reflective objects currently being tracked (see ReflexObject)
ReflexImageCV
struct ReflexImageCV
{
double timestamp;
uint32_t frame_id;
uint32_t shutter;
float gain;
int8_t exposure_mode;
int8_t type;
int8_t sensor_id;
cv::Mat img;
};
The data structure holds header information and image data in the OpenCV computer vision library format.
Members
- timestamp: system internal time at image capture
- frame_id: incremental frame number
- shutter: sensor exposure time in microseconds used during image capture
- gain: sensor gain used during image capture
- exposure_mode: exposure mode used during image capture (see ReflexSensorExposureModes)
- type: image type (see ReflexImageTypes)
- sensor_id: ID of the image sensor the captured the image
- img: image in OpenCV format