ObjectsBatch Class Reference

Class containing batched data of a detected objects from the object detection module. More...

Attributes

int numData = 0
 Number of objects in the sl.ObjectsBatch. More...
 
int id = 0
 Id of the batch. More...
 
OBJECT_CLASS label = OBJECT_CLASS.LAST
 Objects class/category to identify the object type. More...
 
OBJECT_SUBCLASS sublabel = OBJECT_SUBCLASS.LAST
 Objects sub-class/sub-category to identify the object type. More...
 
OBJECT_TRACKING_STATE trackingState = OBJECT_TRACKING_STATE.TERMINATE
 Objects tracking state. More...
 
Vector3[] positions = new Vector3[(int)Constant.MAX_BATCH_SIZE]
 Array of positions for each object. More...
 
float[,] positionCovariances = new float[(int)Constant.MAX_BATCH_SIZE, 6]
 Array of positions' covariances for each object. More...
 
Vector3[] velocities = new Vector3[(int)Constant.MAX_BATCH_SIZE]
 Array of 3D velocities for each object. More...
 
ulong[] timestamps = new ulong[(int)Constant.MAX_BATCH_SIZE]
 Array of timestamps for each object. More...
 
Vector3[,] boundingBoxes = new Vector3[(int)Constant.MAX_BATCH_SIZE, 8]
 Array of 3D bounding boxes for each object. More...
 
Vector2[,] boundingBoxes2D = new Vector2[(int)Constant.MAX_BATCH_SIZE, 4]
 Array of 2D bounding boxes for each object. More...
 
float[] confidences = new float[(int)Constant.MAX_BATCH_SIZE]
 Array of confidences for each object. More...
 
OBJECT_ACTION_STATE[] actionStates = new OBJECT_ACTION_STATE[(int)Constant.MAX_BATCH_SIZE]
 Array of action states for each object. More...
 
Vector2[,] headBoundingBoxes2D = new Vector2[(int)Constant.MAX_BATCH_SIZE, 8]
 Array of 2D bounding box of the head for each object (person). More...
 
Vector3[,] headBoundingBoxes = new Vector3[(int)Constant.MAX_BATCH_SIZE, 8]
 Array of 3D bounding box of the head for each object (person). More...
 
Vector3[] headPositions = new Vector3[(int)Constant.MAX_BATCH_SIZE]
 Array of 3D centroid of the head for each object (person). More...
 

Detailed Description

Class containing batched data of a detected objects from the object detection module.

This class can be used to store trajectories.

Variables

◆ numData

int numData = 0

Number of objects in the sl.ObjectsBatch.

Use this to iterate through the top of positions / velocities / boundingBoxes / etc.

Note
Objects with greater indexes are empty.

◆ id

int id = 0

Id of the batch.

◆ label

OBJECT_CLASS label = OBJECT_CLASS.LAST

Objects class/category to identify the object type.

◆ sublabel

OBJECT_SUBCLASS sublabel = OBJECT_SUBCLASS.LAST

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

◆ trackingState

◆ positions

Vector3 [] positions = new Vector3[(int)Constant.MAX_BATCH_SIZE]

Array of positions for each object.

◆ positionCovariances

float [,] positionCovariances = new float[(int)Constant.MAX_BATCH_SIZE, 6]

Array of positions' covariances for each object.

◆ velocities

Vector3 [] velocities = new Vector3[(int)Constant.MAX_BATCH_SIZE]

Array of 3D velocities for each object.

◆ timestamps

ulong [] timestamps = new ulong[(int)Constant.MAX_BATCH_SIZE]

Array of timestamps for each object.

◆ boundingBoxes

Vector3 [,] boundingBoxes = new Vector3[(int)Constant.MAX_BATCH_SIZE, 8]

Array of 3D bounding boxes for each object.

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

◆ boundingBoxes2D

Vector2 [,] boundingBoxes2D = new Vector2[(int)Constant.MAX_BATCH_SIZE, 4]

Array of 2D bounding boxes for each object.

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

◆ confidences

float [] confidences = new float[(int)Constant.MAX_BATCH_SIZE]

Array of confidences for each object.

◆ actionStates

Array of action states for each object.

◆ headBoundingBoxes2D

Vector2 [,] headBoundingBoxes2D = new Vector2[(int)Constant.MAX_BATCH_SIZE, 8]

Array of 2D bounding box of the head for each object (person).

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.

◆ headBoundingBoxes

Vector3 [,] headBoundingBoxes = new Vector3[(int)Constant.MAX_BATCH_SIZE, 8]

Array of 3D bounding box of the head for each object (person).

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

◆ headPositions

Vector3 [] headPositions = new Vector3[(int)Constant.MAX_BATCH_SIZE]

Array of 3D centroid of the head for each object (person).

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