Object tracking in the package 17 update is provided by the Centroid Object Tracker operation, based on the popular algorithm. We won’t go into too much detail on the algorithm or its drawbacks; see the literature for more information.
Our implementation is simple and based on the pairwise distances of existing and incoming objects. Each object tracks this information:
- Unique ID
- Bounding box
- Centroid
- History (track)
Object tracking requires contour data as input; this comes from the Contour Data operation, and highlights another new feature; named data items.
An interesting property is the Deactivate Count
that “holds onto” a tracked object for the given number of frames, before permanently removing it from the list. This is useful if objects temporarily leave the frame or their contour is “missed” for several frames.
The COT also uses named data items to store its output; the Draw Tracked Contours operation consumes this as a named data input. The COT of course outputs CSV as well!
The DTC takes this data input, and drawing information, and renders it on the frame. You can specify colors and line styles for all the components tracked for each object.
The demo pipeline above demonstrates the minimum operations required to extract contours, feed them to the COT, then render everything.