Skip to content

Commit 7a9126b

Browse files
authored
Merge pull request #243 from luxonis/object_tracker_docs
added object tracker and tracklets docs page
2 parents d99fa42 + 388b3d8 commit 7a9126b

File tree

3 files changed

+142
-1
lines changed

3 files changed

+142
-1
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Tracklets
2+
=========
3+
4+
Tracklets are produced by the :ref:`ObjectTracker` node. They provide tracking information of the tracked objects.
5+
6+
Examples of functionality
7+
#########################
8+
9+
- :ref:`29.1 - Object tracker on RGB camera`
10+
- :ref:`29.2 - Spatial object tracker on RGB camera`
11+
- :ref:`29.3 - Object tracker on video`
12+
13+
Reference
14+
#########
15+
16+
.. tabs::
17+
18+
.. tab:: Python
19+
20+
.. autoclass:: depthai.Tracklets
21+
:members:
22+
:inherited-members:
23+
:noindex:
24+
25+
.. tab:: C++
26+
27+
.. doxygenclass:: dai::Tracklets
28+
:project: depthai-core
29+
:members:
30+
:private-members:
31+
:undoc-members:
32+
33+
.. include:: ../../includes/footer-short.rst

docs/source/components/nodes/color_camera.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Usage
6464
.. code-tab:: c++
6565

6666
dai::Pipeline pipeline;
67-
auto cam = pipeline.create<dai::node::createColorCamera>();
67+
auto cam = pipeline.create<dai::node::ColorCamera>();
6868
cam->setPreviewSize(300, 300);
6969
cam->setBoardSocket(dai::CameraBoardSocket::RGB);
7070
cam->setResolution(dai::ColorCameraProperties::SensorResolution::THE_1080_P);
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
ObjectTracker
2+
=============
3+
4+
Object tracker tracks detected objects from the :ref:`ImgDetections` using Kalman filter and hungarian algorithm.
5+
6+
How to place it
7+
###############
8+
9+
.. tabs::
10+
11+
.. code-tab:: py
12+
13+
pipeline = dai.Pipeline()
14+
objectTracker = pipeline.createObjectTracker()
15+
16+
.. code-tab:: c++
17+
18+
dai::Pipeline pipeline;
19+
auto objectTracker = pipeline.create<dai::node::ObjectTracker>();
20+
21+
22+
Inputs and Outputs
23+
##################
24+
25+
.. code-block::
26+
27+
┌───────────────────┐
28+
inputDetectionFrame │ │passthroughDetectionFrame
29+
───────────────────►│-------------------├─────────────────────────►
30+
│ │ out
31+
│ Object ├─────────────────────────►
32+
inputTrackerFrame │ Tracker │ passthroughTrackerFrame
33+
───────────────────►│-------------------├─────────────────────────►
34+
inputDetections │ │ passthroughDetections
35+
───────────────────►│-------------------├─────────────────────────►
36+
└───────────────────┘
37+
38+
**Message types**
39+
40+
- :code:`inputDetectionFrame` - :ref:`ImgFrame`
41+
- :code:`inputTrackerFrame` - :ref:`ImgFrame`
42+
- :code:`inputDetections` - :ref:`ImgDetections`
43+
- :code:`out` - :ref:`Tracklets`
44+
- :code:`passthroughDetectionFrame` - :ref:`ImgFrame`
45+
- :code:`passthroughTrackerFrame` - :ref:`ImgFrame`
46+
- :code:`passthroughDetections` - :ref:`ImgDetections`
47+
48+
Usage
49+
#####
50+
51+
.. tabs::
52+
53+
.. code-tab:: py
54+
55+
pipeline = dai.Pipeline()
56+
objectTracker = pipeline.createObjectTracker()
57+
58+
objectTracker.setDetectionLabelsToTrack([15]) # Track only person
59+
# Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS
60+
objectTracker.setTrackerType(dai.TrackerType.ZERO_TERM_COLOR_HISTOGRAM)
61+
# Take the smallest ID when new object is tracked, possible options: SMALLEST_ID, UNIQUE_ID
62+
objectTracker.setTrackerIdAssigmentPolicy(dai.TrackerIdAssigmentPolicy.SMALLEST_ID)
63+
64+
# You have to use Object tracker in combination with detection network
65+
# and an image frame source - mono/color camera or xlinkIn node
66+
67+
.. code-tab:: c++
68+
69+
dai::Pipeline pipeline;
70+
auto objectTracker = pipeline.create<dai::node::ObjectTracker>();
71+
72+
objectTracker->setDetectionLabelsToTrack({15}); // Track only person
73+
// Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS
74+
objectTracker->setTrackerType(dai::TrackerType::ZERO_TERM_COLOR_HISTOGRAM);
75+
// Take the smallest ID when new object is tracked, possible options: SMALLEST_ID, UNIQUE_ID
76+
objectTracker->setTrackerIdAssigmentPolicy(dai::TrackerIdAssigmentPolicy::SMALLEST_ID);
77+
78+
// You have to use Object tracker in combination with detection network
79+
// and an image frame source - mono/color camera or xlinkIn node
80+
81+
Examples of functionality
82+
#########################
83+
84+
- :ref:`29.1 - Object tracker on RGB camera`
85+
- :ref:`29.2 - Spatial object tracker on RGB camera`
86+
- :ref:`29.3 - Object tracker on video`
87+
88+
Reference
89+
#########
90+
91+
.. tabs::
92+
93+
.. tab:: Python
94+
95+
.. autoclass:: depthai.ObjectTracker
96+
:members:
97+
:inherited-members:
98+
:noindex:
99+
100+
.. tab:: C++
101+
102+
.. doxygenclass:: dai::node::ObjectTracker
103+
:project: depthai-core
104+
:members:
105+
:private-members:
106+
:undoc-members:
107+
108+
.. include:: ../../includes/footer-short.rst

0 commit comments

Comments
 (0)