# Tracklets

Tracklets are produced by the
[ObjectTracker](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/object_tracker.md) node. They provide
tracking information for detected objects, including ROI, track ID, label, age, and status.

When the tracker receives detections with spatial data, each tracklet also carries spatialCoordinates (X/Y/Z in mm). velocity and
speed are optional 3D estimates in m/s and are empty when no valid spatial state is available, such as RGB-only tracking.

## Examples of functionality

 * [Object tracker on RGB](https://docs.luxonis.com/software-v3/depthai/examples/object_tracker/object_tracker.md)
 * [Object tracker on video](https://docs.luxonis.com/software-v3/depthai/examples/object_tracker/object_tracker_replay.md)
 * [ObjectTracker on depth with
   remap](https://docs.luxonis.com/software-v3/depthai/examples/object_tracker/object_tracker_remap.md)

## Reference

### dai::Tracklets

Kind: class

Tracklets message. Carries object tracking information.

#### LengthUnit unit

Kind: variable

Measurement unit used by all tracklets'

#### std::vector< Tracklet > tracklets

Kind: variable

Retrieve data for Tracklets . return: Vector of object tracker data, carrying tracking information.

#### int64_t sequenceNum

Kind: variable

#### Timestamp ts

Kind: variable

#### Timestamp tsDevice

Kind: variable

#### std::optional< ImgTransformation > transformation

Kind: variable

#### Tracklets()

Kind: function

Construct Tracklets message.

#### ~Tracklets()

Kind: function

#### Tracklets transformTo(const ImgTransformation & target)

Kind: function

Returns a new Tracklets message with the tracklets transformed into the target image transformation. For each tracklet, the
bounding box is assumed to lie on a plane parallel to the image plane at depth parameters: target: Target image transformation.

#### void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)

Kind: function

#### DEPTHAI_SERIALIZE(Tracklets, tracklets, transformation, ts, tsDevice, sequenceNum, unit)

Kind: function

#### std::optional< ImgTransformation > getTransformation()

Kind: function

Returns the current transformation if set, else std::nullopt.

#### void setTransformation(const ImgTransformation & transformation)

Kind: function

Sets the current transformation.

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
