This contribution changes the way how trackers should be implemented by
programmer. It should be noted first, that from the user prospective,
Tracker::create() method still can be called with the same effect.
However, there's no more thing as a "constructor" for Tracker, they
should be created via static functions, e.g.
static Ptr<TrackerMIL> createTracker(const TrackerMIL::Params ¶meters=TrackerMIL::Params());
From the programmer's perspective now for every tracker what is declared
in tracker.hpp header is more a "interface", while the real
implementation class can (and has to) be implemented in .cpp file.
Changes in documentation are also included.
@ -69,35 +69,57 @@ The following detector types are supported:
Creating Own Tracker
--------------------
If you want create a new tracker, you should follow some simple rules.
First, your tracker should be inherit from :ocv:class:`Tracker`, so you must implement two method:
* Tracker: initImpl, it should be called once in the first frame, here you should initialize all structures. The second argument is the initial bounding box of the target.
* Tracker:updateImpl, it should be called at the begin of in loop through video frames. Here you should overwrite the bounding box with new location.
Example of creating specialized Tracker ``TrackerMIL`` : ::