ObjectData Class Reference

Contains data of a detected object such as its bounding_box, label, id and its 3D position. More...

Functions

 ObjectData ()
 
 ~ObjectData ()
 

Attributes

int id
 Object identification number, used as a reference when tracking the object through the frames. More...
 
String unique_object_id
 Unique ID to help identify and track AI detections. Can be either generated externally, or using generate_unique_id() or left empty. More...
 
int raw_label = 0
 Object label, forwarded from CustomBoxObjectData when using OBJECT_DETECTION_MODEL::CUSTOM_BOX_OBJECTS. More...
 
OBJECT_CLASS label
 Object category. Identify the object type. More...
 
OBJECT_SUBCLASS sublabel
 Object subclass. More...
 
OBJECT_TRACKING_STATE tracking_state
 Defines the object tracking state. More...
 
OBJECT_ACTION_STATE action_state
 Defines the object action state. More...
 
sl::float3 position
 Defines the object 3D centroid. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
sl::float3 velocity
 Defines the object 3D velocity Defined in sl:InitParameters::UNIT / seconds, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
float position_covariance [6]
 the covariance matrix of the 3d position, represented by its upper triangular matrix value More...
 
std::vector< sl::uint2bounding_box_2d
 2D bounding box of the person represented as four 2D points starting at the top left corner and rotation clockwise. Expressed in pixels on the original image resolution, [0,0] is the top left corner. More...
 
sl::Mat mask
 Defines for the bounding_box_2d the pixels which really belong to the object (set to 255) and those of the background (set to 0). More...
 
float confidence
 Defines the detection confidence value of the object. From 0 to 100, a low value means the object might not be localized perfectly or the label (OBJECT_CLASS) is uncertain. More...
 
std::vector< sl::float3bounding_box
 3D bounding box of the person represented as eight 3D points Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
sl::float3 dimensions
 3D object dimensions: width, height, length Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
std::vector< sl::uint2head_bounding_box_2d
 bounds the head with four 2D points. Expressed in pixels on the original image resolution. More...
 
std::vector< sl::float3head_bounding_box
 bounds the head with eight 3D points. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
sl::float3 head_position
 3D head centroid. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 

Detailed Description

Contains data of a detected object such as its bounding_box, label, id and its 3D position.

Constructor and Destructor

◆ ObjectData()

◆ ~ObjectData()

~ObjectData ( )

Variables

◆ id

int id

Object identification number, used as a reference when tracking the object through the frames.

Note
Only available if ObjectDetectionParameters::enable_tracking is activated else set to -1.

◆ unique_object_id

String unique_object_id

Unique ID to help identify and track AI detections. Can be either generated externally, or using generate_unique_id() or left empty.

◆ raw_label

int raw_label = 0

Object label, forwarded from CustomBoxObjectData when using OBJECT_DETECTION_MODEL::CUSTOM_BOX_OBJECTS.

◆ label

OBJECT_CLASS label

Object category. Identify the object type.

◆ sublabel

OBJECT_SUBCLASS sublabel

Object subclass.

◆ tracking_state

OBJECT_TRACKING_STATE tracking_state

Defines the object tracking state.

◆ action_state

OBJECT_ACTION_STATE action_state

Defines the object action state.

◆ position

sl::float3 position

Defines the object 3D centroid. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame.

◆ velocity

sl::float3 velocity

Defines the object 3D velocity Defined in sl:InitParameters::UNIT / seconds, expressed in RuntimeParameters::measure3D_reference_frame.

◆ position_covariance

float position_covariance[6]

the covariance matrix of the 3d position, represented by its upper triangular matrix value

= [p0, p1, p2]
[p1, p3, p4]
[p2, p4, p5]

where pi is position_covariance[i]

◆ bounding_box_2d

std::vector<sl::uint2> bounding_box_2d

2D bounding box of the person represented as four 2D points starting at the top left corner and rotation clockwise. Expressed in pixels on the original image resolution, [0,0] is the top left corner.

A ------ B
| Object |
D ------ C

◆ mask

sl::Mat mask

Defines for the bounding_box_2d the pixels which really belong to the object (set to 255) and those of the background (set to 0).

Warning
: The mask information is only available for tracked objects ( OBJECT_TRACKING_STATE::OK) that have a valid depth. Otherwise, Mat will not be initialized (mask.isInit() == false)

◆ confidence

float confidence

Defines the detection confidence value of the object. From 0 to 100, a low value means the object might not be localized perfectly or the label (OBJECT_CLASS) is uncertain.

◆ bounding_box

std::vector<sl::float3> bounding_box

3D bounding box of the person represented as eight 3D points Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame.

1 ------ 2
/ /|
0 ------ 3 |
| Object | 6
| |/
4 ------ 7

◆ dimensions

sl::float3 dimensions

3D object dimensions: width, height, length Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame.

◆ head_bounding_box_2d

std::vector<sl::uint2> head_bounding_box_2d

bounds the head with four 2D points. Expressed in pixels on the original image resolution.

Note
Not available with DETECTION_MODEL::MULTI_CLASS_BOX.

◆ head_bounding_box

std::vector<sl::float3> head_bounding_box

bounds the head with eight 3D points. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame.

Note
Not available with DETECTION_MODEL::MULTI_CLASS_BOX.

◆ head_position

sl::float3 head_position

3D head centroid. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame.

Note
Not available with DETECTION_MODEL::MULTI_CLASS_BOX*.