How it works...
The MultiTracker class from OpenCV was used to implement multi-object tracking. The multi-object tracker (which is implemented simply as a collection of single-object trackers) processes the tracked objects independently.
A multi-object tracker needs two inputs, namely, a reference video frame (we used the first video frame as reference) and locations (to be specified in terms of bounding boxes) of all of the objects (in the reference frame) that we want to track. Then, the tracker simultaneously tracks the locations of the target objects in the succeeding frames.
OpenCV has eight different object trackers (types): BOOSTING, MIL, KCF, TLD, MEDIANFLOW, GOTURN, MOSSE, and CSRT. The KCF tracker is fast and accurate, the CSRT ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access