Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/source/components/messages/tracklets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Tracklets
=========

Tracklets are produced by the :ref:`ObjectTracker` node. They provide tracking information of the tracked objects.

Examples of functionality
#########################

- :ref:`29.1 - Object tracker on RGB camera`
- :ref:`29.2 - Spatial object tracker on RGB camera`
- :ref:`29.3 - Object tracker on video`

Reference
#########

.. tabs::

.. tab:: Python

.. autoclass:: depthai.Tracklets
:members:
:inherited-members:
:noindex:

.. tab:: C++

.. doxygenclass:: dai::Tracklets
:project: depthai-core
:members:
:private-members:
:undoc-members:

.. include:: ../../includes/footer-short.rst
2 changes: 1 addition & 1 deletion docs/source/components/nodes/color_camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Usage
.. code-tab:: c++

dai::Pipeline pipeline;
auto cam = pipeline.create<dai::node::createColorCamera>();
auto cam = pipeline.create<dai::node::ColorCamera>();
cam->setPreviewSize(300, 300);
cam->setBoardSocket(dai::CameraBoardSocket::RGB);
cam->setResolution(dai::ColorCameraProperties::SensorResolution::THE_1080_P);
Expand Down
108 changes: 108 additions & 0 deletions docs/source/components/nodes/object_tracker.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
ObjectTracker
=============

Object tracker tracks detected objects from the :ref:`ImgDetections` using Kalman filter and hungarian algorithm.

How to place it
###############

.. tabs::

.. code-tab:: py

pipeline = dai.Pipeline()
objectTracker = pipeline.createObjectTracker()

.. code-tab:: c++

dai::Pipeline pipeline;
auto objectTracker = pipeline.create<dai::node::ObjectTracker>();


Inputs and Outputs
##################

.. code-block::

┌───────────────────┐
inputDetectionFrame │ │passthroughDetectionFrame
───────────────────►│-------------------├─────────────────────────►
│ │ out
│ Object ├─────────────────────────►
inputTrackerFrame │ Tracker │ passthroughTrackerFrame
───────────────────►│-------------------├─────────────────────────►
inputDetections │ │ passthroughDetections
───────────────────►│-------------------├─────────────────────────►
└───────────────────┘

**Message types**

- :code:`inputDetectionFrame` - :ref:`ImgFrame`
- :code:`inputTrackerFrame` - :ref:`ImgFrame`
- :code:`inputDetections` - :ref:`ImgDetections`
- :code:`out` - :ref:`Tracklets`
- :code:`passthroughDetectionFrame` - :ref:`ImgFrame`
- :code:`passthroughTrackerFrame` - :ref:`ImgFrame`
- :code:`passthroughDetections` - :ref:`ImgDetections`

Usage
#####

.. tabs::

.. code-tab:: py

pipeline = dai.Pipeline()
objectTracker = pipeline.createObjectTracker()

objectTracker.setDetectionLabelsToTrack([15]) # Track only person
# Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS
objectTracker.setTrackerType(dai.TrackerType.ZERO_TERM_COLOR_HISTOGRAM)
# Take the smallest ID when new object is tracked, possible options: SMALLEST_ID, UNIQUE_ID
objectTracker.setTrackerIdAssigmentPolicy(dai.TrackerIdAssigmentPolicy.SMALLEST_ID)

# You have to use Object tracker in combination with detection network
# and an image frame source - mono/color camera or xlinkIn node

.. code-tab:: c++

dai::Pipeline pipeline;
auto objectTracker = pipeline.create<dai::node::ObjectTracker>();

objectTracker->setDetectionLabelsToTrack({15}); // Track only person
// Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS
objectTracker->setTrackerType(dai::TrackerType::ZERO_TERM_COLOR_HISTOGRAM);
// Take the smallest ID when new object is tracked, possible options: SMALLEST_ID, UNIQUE_ID
objectTracker->setTrackerIdAssigmentPolicy(dai::TrackerIdAssigmentPolicy::SMALLEST_ID);

// You have to use Object tracker in combination with detection network
// and an image frame source - mono/color camera or xlinkIn node

Examples of functionality
#########################

- :ref:`29.1 - Object tracker on RGB camera`
- :ref:`29.2 - Spatial object tracker on RGB camera`
- :ref:`29.3 - Object tracker on video`

Reference
#########

.. tabs::

.. tab:: Python

.. autoclass:: depthai.ObjectTracker
:members:
:inherited-members:
:noindex:

.. tab:: C++

.. doxygenclass:: dai::node::ObjectTracker
:project: depthai-core
:members:
:private-members:
:undoc-members:

.. include:: ../../includes/footer-short.rst