ObjectData Struct Reference

Structure containing data of a detected object such as its boundingBox, label, id and its 3D position. More...

Attributes

int id
 Object identification number. More...
 
string uniqueObjectId
 Unique id to help identify and track AI detections. More...
 
int rawLabel
 Object raw label. More...
 
sl.OBJECT_CLASS label
 Object class/category to identify the object type. More...
 
sl.OBJECT_SUBCLASS sublabel
 Object sub-class/sub-category to identify the object type. More...
 
sl.OBJECT_TRACKING_STATE objectTrackingState
 Object tracking state. More...
 
sl.OBJECT_ACTION_STATE actionState
 Object action state. More...
 
Vector3 position
 Object 3D centroid. More...
 
float confidence
 Detection confidence value of the object. More...
 
System.IntPtr mask
 Mask defining which pixels which belong to the object (in boundingBox and set to 255) and those of the background (set to 0). More...
 
Vector2[] boundingBox2D
 2D bounding box of the object represented as four 2D points starting at the top left corner and rotation clockwise. More...
 
Vector3 headPosition
 3D centroid of the head of the object (a person). More...
 
Vector3 velocity
 Object 3D velocity. More...
 
Vector3 dimensions
 3D object dimensions: width, height, length. More...
 
Vector3[] boundingBox
 3D bounding box of the object represented as eight 3D points. More...
 
Vector3[] headBoundingBox
 3D bounding box of the head of the object (a person) represented as eight 3D points. More...
 
Vector2[] headBoundingBox2D
 2D bounding box of the head of the object (a person) represented as four 2D points starting at the top left corner and rotation clockwise. More...
 
float[] positionCovariance
 Covariance matrix of the 3D position. More...
 

Detailed Description

Structure containing data of a detected object such as its boundingBox, label, id and its 3D position.

Variables

◆ id

int id

Object identification number.

It is used as a reference when tracking the object through the frames.

Note
Only available if sl.ObjectDetectionParameters.enableTracking is activated.
Otherwise, it will be set to -1.

◆ uniqueObjectId

string uniqueObjectId

Unique id to help identify and track AI detections.

It can be either generated externally, or by using sl.Camera.GenerateUniqueID() or left empty.

◆ rawLabel

int rawLabel

Object raw label.

It is forwarded from sl.CustomBoxObjectData when using sl.OBJECT_DETECTION_MODEL.CUSTOM_BOX_OBJECTS.

◆ label

Object class/category to identify the object type.

◆ sublabel

Object sub-class/sub-category to identify the object type.

◆ objectTrackingState

sl.OBJECT_TRACKING_STATE objectTrackingState

Object tracking state.

◆ actionState

Object action state.

◆ position

Vector3 position

Object 3D centroid.

Note
It is defined in sl.InitParameters.coordinateUnits and expressed in sl.RuntimeParameters.measure3DReferenceFrame.

◆ confidence

float confidence

Detection confidence value of the object.

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

◆ mask

System.IntPtr mask

Mask defining which pixels which belong to the object (in boundingBox and set to 255) and those of the background (set to 0).

Warning
The mask information is only available for tracked objects (sl.OBJECT_TRACKING_STATE.OK) that have a valid depth.
Otherwise, the mask will not be initialized.

◆ boundingBox2D

Vector2 [] boundingBox2D

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

◆ headPosition

Vector3 headPosition

3D centroid of the head of the object (a person).

Note
It is defined in sl.InitParameters.coordinateUnits and expressed in sl.RuntimeParameters.measure3DReferenceFrame.
Warning
Not available with sl.OBJECT_DETECTION_MODEL.MULTI_CLASS_BOX_XXX.

◆ velocity

Vector3 velocity

Object 3D velocity.

Note
It is defined in sl.InitParameters.coordinateUnits / s and expressed in sl.RuntimeParameters.measure3DReferenceFrame.

◆ dimensions

Vector3 dimensions

3D object dimensions: width, height, length.

Note
It is defined in sl.InitParameters.coordinateUnits and expressed in sl.RuntimeParameters.measure3DReferenceFrame.

◆ boundingBox

Vector3 [] boundingBox

3D bounding box of the object represented as eight 3D points.

Note
It is defined in sl.InitParameters.coordinateUnits and expressed in sl.RuntimeParameters.measure3DReferenceFrame.
1 ------ 2
/ /|
0 ------ 3 |
| Object | 6
| |/
4 ------ 7

◆ headBoundingBox

Vector3 [] headBoundingBox

3D bounding box of the head of the object (a person) represented as eight 3D points.

Note
It is defined in sl.InitParameters.coordinateUnits and expressed in sl.RuntimeParameters.measure3DReferenceFrame.
Warning
Not available with sl.OBJECT_DETECTION_MODEL.MULTI_CLASS_BOX_XXX.

◆ headBoundingBox2D

Vector2 [] headBoundingBox2D

2D bounding box of the head of the object (a person) 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.
Warning
Not available with sl.OBJECT_DETECTION_MODEL.MULTI_CLASS_BOX_XXX.

◆ positionCovariance

float [] positionCovariance

Covariance matrix of the 3D position.

Note
It is represented by its upper triangular matrix value
= [p0, p1, p2]
[p1, p3, p4]
[p2, p4, p5]
where pi is positionCovariance[i]