CustomMaskObjectData Class Reference

Class that store externally detected objects with mask. More...

Functions

 CustomMaskObjectData ()
 Default constructor. More...
 

Attributes

String unique_object_id
 Unique id to help identify and track AI detections. More...
 
std::vector< sl::uint2 > bounding_box_2d
 2D bounding box of the object represented as four 2D points starting at the top left corner and rotation clockwise. More...
 
int label
 Object label. More...
 
float probability
 Detection confidence value of the object. More...
 
bool is_grounded = true
 Provide hypothesis about the object movements (degrees of freedom or DoF) to improve the object tracking. More...
 
bool is_static = false
 Provide hypothesis about the object staticity to improve the object tracking. More...
 
float tracking_timeout = -1.F
 Maximum tracking time threshold (in seconds) before dropping the tracked object when unseen for this amount of time. By default, let the tracker decide internally based on the internal sub class of the tracked object. Only valid for static object. More...
 
float tracking_max_dist = -1.F
 Maximum tracking distance threshold (in meters) before dropping the tracked object when unseen for this amount of meters. By default, do not discard tracked object based on distance. Only valid for static object. More...
 
sl::Mat box_mask
 2D mask of the object inside its bounding box. More...
 

Detailed Description

Class that store externally detected objects with mask.

The objects can be ingested with sl::Camera.ingestCustomMaskObjects() to extract 3D and tracking information over time.

Constructor and Destructor

◆ CustomMaskObjectData()

Default constructor.

Variables

◆ unique_object_id

String unique_object_id

Unique id to help identify and track AI detections.

It can be either generated externally, or by using generate_unique_id() or left empty.

◆ bounding_box_2d

std::vector<sl::uint2> bounding_box_2d

2D bounding box of the object represented as four 2D points starting at the top left corner and rotation clockwise.

Note
Expressed in pixels on the original image resolution, [0, 0] is the top left corner.
A ------ B
| Object |
D ------ C

◆ label

int label

Object label.

This information is passed-through and can be used to improve object tracking.

Note
It should define an object class. This means that any similar object (in classification) should share the same label number.

◆ probability

float probability

Detection confidence value of the object.

Note
The value should be in [0-1].
It can be used to improve the object tracking.

◆ is_grounded

bool is_grounded = true

Provide hypothesis about the object movements (degrees of freedom or DoF) to improve the object tracking.

  • true: 2 DoF projected alongside the floor plane. Case for object standing on the ground such as person, vehicle, etc.
    The projection implies that the objects cannot be superposed on multiple horizontal levels.
  • false: 6 DoF (full 3D movements are allowed).
Note
This parameter cannot be changed for a given object tracking id.
It is advised to set it by labels to avoid issues.

◆ is_static

bool is_static = false

Provide hypothesis about the object staticity to improve the object tracking.

  • true: the object will be assumed to never move nor being moved.
  • false: the object will be assumed to be able to move or being moved.

◆ tracking_timeout

float tracking_timeout = -1.F

Maximum tracking time threshold (in seconds) before dropping the tracked object when unseen for this amount of time. By default, let the tracker decide internally based on the internal sub class of the tracked object. Only valid for static object.

◆ tracking_max_dist

float tracking_max_dist = -1.F

Maximum tracking distance threshold (in meters) before dropping the tracked object when unseen for this amount of meters. By default, do not discard tracked object based on distance. Only valid for static object.

◆ box_mask

sl::Mat box_mask

2D mask of the object inside its bounding box.