SL_ObjectData Struct Reference

Data Fields

int id
 Object identification number, used as a reference when tracking the object through the frames. More...
 
unsigned char unique_object_id [37]
 Unique ID to help identify and track AI detections. Can be either generated externally, or using sl_generate_unique_id() or left empty.
 
int raw_label
 Object label, forwarded from CustomBoxObjects when using SL_DETECTION_MODEL_CUSTOM_BOX_OBJECTS.
 
enum SL_OBJECT_CLASS label
 Object category. Identify the object type (sl::OBJECT_CLASS)
 
enum SL_OBJECT_SUBCLASS sublabel
 Object subclass (sl::OBJECT_SUBCLASS)
 
enum SL_OBJECT_TRACKING_STATE tracking_state
 Defines the object tracking state (sl::OBJECT_TRACKING_STATE).
 
enum SL_OBJECT_ACTION_STATE action_state
 Defines the object action state (sl::OBJECT_ACTION_STATE).
 
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.
 
int * mask
 
struct SL_Vector2 bounding_box_2d [4]
 
struct SL_Vector3 position
 Defines the object 3D centroid. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame.
 
struct SL_Vector3 head_position
 3D head centroid. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
struct SL_Vector3 velocity
 Defines the object 3D velocity Defined in sl:InitParameters::UNIT / seconds, expressed in RuntimeParameters::measure3D_reference_frame.
 
struct SL_Vector3 dimensions
 3D object dimensions: width, height, length. Defined in SL_InitParameters_UNIT, expressed in SL_RuntimeParameters::measure3D_reference_frame.
 
struct SL_Vector3 bounding_box [8]
 3D bounding box of the person represented as eight 3D points Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
struct SL_Vector3 head_bounding_box [8]
 bounds the head with eight 3D points. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame. More...
 
struct SL_Vector2 keypoint_2d [34]
 A set of useful points representing the human body, expressed in 2D, respect to the original image resolution. We use a classic 18 points representation, the points semantic and order is given by BODY_PARTS. Expressed in pixels on the original image resolution, [0,0] is the top left corner. More...
 
struct SL_Vector3 keypoint [34]
 A set of useful points representing the human body, expressed in 3D. We use a classic 18 points representation, the points semantic and order is given by BODY_PARTS. Defined in sl:InitParameters::UNIT, 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...
 
float keypoint_confidence [34]
 Per keypoint detection confidence, can not be lower than the ObjectDetectionRuntimeParameters::detection_confidence_threshold. More...
 
struct SL_Vector3 local_position_per_joint [34]
 Per keypoint local position (the position of the child keypoint with respect to its parent expressed in its parent coordinate frame) More...
 
struct SL_Quaternion local_orientation_per_joint [34]
 Per keypoint local orientation. More...
 
struct SL_Quaternion global_root_orientation
 global root orientation of the skeleton. The orientation is also represented by a quaternion with the same format as local_orientation_per_joint
 

Detailed Description

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

Field Documentation

◆ id

int SL_ObjectData::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.

◆ head_position

struct SL_Vector3 SL_ObjectData::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.

◆ bounding_box

struct SL_Vector3 SL_ObjectData::bounding_box[8]

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

◆ head_bounding_box

struct SL_Vector3 SL_ObjectData::head_bounding_box[8]

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.

◆ keypoint_2d

struct SL_Vector2 SL_ObjectData::keypoint_2d[34]

A set of useful points representing the human body, expressed in 2D, respect to the original image resolution. We use a classic 18 points representation, the points semantic and order is given by BODY_PARTS. Expressed in pixels on the original image resolution, [0,0] is the top left corner.

Note
Not available with DETECTION_MODEL::MULTI_CLASS_BOX.
Warning
in some cases, eg. body partially out of the image, some keypoint can not be detected, they will have negatives coordinates.

◆ keypoint

struct SL_Vector3 SL_ObjectData::keypoint[34]

A set of useful points representing the human body, expressed in 3D. We use a classic 18 points representation, the points semantic and order is given by BODY_PARTS. Defined in sl:InitParameters::UNIT, expressed in RuntimeParameters::measure3D_reference_frame.

Note
Not available with DETECTION_MODEL::MULTI_CLASS_BOX.
Warning
in some cases, eg. body partially out of the image or missing depth data, some keypoint can not be detected, they will have non finite values.

◆ position_covariance

float SL_ObjectData::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]

◆ keypoint_confidence

float SL_ObjectData::keypoint_confidence[34]

Per keypoint detection confidence, can not be lower than the ObjectDetectionRuntimeParameters::detection_confidence_threshold.

Note
Not available with DETECTION_MODEL::MULTI_CLASS_BOX.
Warning
in some cases, eg. body partially out of the image or missing depth data, some keypoint can not be detected, they will have non finite values.

◆ local_position_per_joint

struct SL_Vector3 SL_ObjectData::local_position_per_joint[34]

Per keypoint local position (the position of the child keypoint with respect to its parent expressed in its parent coordinate frame)

Note
it is expressed in sl::REFERENCE_CAMERA or sl::REFERENCE_WORLD Not available with DETECTION_MODEL::MULTI_CLASS_BOX.

◆ local_orientation_per_joint

struct SL_Quaternion SL_ObjectData::local_orientation_per_joint[34]

Per keypoint local orientation.

Note
the orientation is represented by a quaternion which is stored in sl::float4 (sl::float4 q = sl::float4(qx,qy,qz,qw);) Not available with DETECTION_MODEL::MULTI_CLASS_BOX.