diff --git a/docs/source/components/messages/tracklets.rst b/docs/source/components/messages/tracklets.rst new file mode 100644 index 000000000..817eae51b --- /dev/null +++ b/docs/source/components/messages/tracklets.rst @@ -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 diff --git a/docs/source/components/nodes/color_camera.rst b/docs/source/components/nodes/color_camera.rst index 6fb70e384..c995f0bc8 100644 --- a/docs/source/components/nodes/color_camera.rst +++ b/docs/source/components/nodes/color_camera.rst @@ -64,7 +64,7 @@ Usage .. code-tab:: c++ dai::Pipeline pipeline; - auto cam = pipeline.create(); + auto cam = pipeline.create(); cam->setPreviewSize(300, 300); cam->setBoardSocket(dai::CameraBoardSocket::RGB); cam->setResolution(dai::ColorCameraProperties::SensorResolution::THE_1080_P); diff --git a/docs/source/components/nodes/object_tracker.rst b/docs/source/components/nodes/object_tracker.rst new file mode 100644 index 000000000..f06e2e30e --- /dev/null +++ b/docs/source/components/nodes/object_tracker.rst @@ -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(); + + +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(); + + 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