Table Of Contents

Previous topic

TrackerModel diagram

Next topic

Common Interfaces of Tracker

Tracker Algorithms

The following algorithms are implemented at the moment.

[MIL]B Babenko, M-H Yang, and S Belongie, Visual Tracking with Online Multiple Instance Learning, In CVPR, 2009
[OLB]H Grabner, M Grabner, and H Bischof, Real-time tracking via on-line boosting, In Proc. BMVC, volume 1, pages 47– 56, 2006
[MedianFlow]
  1. Kalal, K. Mikolajczyk, and J. Matas, “Forward-Backward Error: Automatic Detection of Tracking Failures,” International Conference on Pattern Recognition, 2010, pp. 23-26.
[TLD]
  1. Kalal, K. Mikolajczyk, and J. Matas, “Tracking-Learning-Detection,” Pattern Analysis and Machine Intelligence 2011.

TrackerBoosting

This is a real-time object tracking based on a novel on-line version of the AdaBoost algorithm. The classifier uses the surrounding background as negative examples in update step to avoid the drifting problem. The implementation is based on [OLB].

class TrackerBoosting

Implementation of TrackerBoosting from Tracker:

class CV_EXPORTS_W TrackerBoosting : public Tracker
{
 public:
  void read( const FileNode& fn );
  void write( FileStorage& fs ) const;
  static Ptr<trackerBoosting> createTracker(const trackerBoosting::Params &parameters=trackerBoosting::Params());
  virtual ~trackerBoosting(){};

 protected:
  bool initImpl( const Mat& image, const Rect2d& boundingBox );
  bool updateImpl( const Mat& image, Rect2d& boundingBox );
};

TrackerBoosting::Params

struct TrackerBoosting::Params

List of BOOSTING parameters:

struct CV_EXPORTS Params
{
 Params();
 int numClassifiers;  //the number of classifiers to use in a OnlineBoosting algorithm
 float samplerOverlap;  //search region parameters to use in a OnlineBoosting algorithm
 float samplerSearchFactor;  // search region parameters to use in a OnlineBoosting algorithm
 int iterationInit;  //the initial iterations
 int featureSetNumFeatures;  // #features

 void read( const FileNode& fn );
 void write( FileStorage& fs ) const;
};

TrackerBoosting::createTracker

Constructor

C++: Ptr<trackerBoosting> TrackerBoosting::createTracker(const trackerBoosting::Params& parameters=trackerBoosting::Params())
Parameters:

TrackerMIL

The MIL algorithm trains a classifier in an online manner to separate the object from the background. Multiple Instance Learning avoids the drift problem for a robust tracking. The implementation is based on [MIL].

Original code can be found here http://vision.ucsd.edu/~bbabenko/project_miltrack.shtml

class TrackerMIL

Implementation of TrackerMIL from Tracker:

class CV_EXPORTS_W TrackerMIL : public Tracker
{
 public:
  void read( const FileNode& fn );
  void write( FileStorage& fs ) const;
  static Ptr<trackerMIL> createTracker(const trackerMIL::Params &parameters=trackerMIL::Params());
  virtual ~trackerMIL(){};

 protected:
  bool initImpl( const Mat& image, const Rect2d& boundingBox );
  bool updateImpl( const Mat& image, Rect2d& boundingBox );
};

TrackerMIL::Params

struct TrackerMIL::Params

List of MIL parameters:

struct CV_EXPORTS Params
{
 Params();
 //parameters for sampler
 float samplerInitInRadius;   // radius for gathering positive instances during init
 int samplerInitMaxNegNum;    // # negative samples to use during init
 float samplerSearchWinSize;  // size of search window
 float samplerTrackInRadius;  // radius for gathering positive instances during tracking
 int samplerTrackMaxPosNum;   // # positive samples to use during tracking
 int samplerTrackMaxNegNum;   // # negative samples to use during tracking

 int featureSetNumFeatures;   // # features

 void read( const FileNode& fn );
 void write( FileStorage& fs ) const;
};

TrackerMIL::createTracker

Constructor

C++: Ptr<trackerMIL> TrackerMIL::createTracker(const trackerMIL::Params& parameters=trackerMIL::Params())
Parameters:

TrackerMedianFlow

Implementation of a paper “Forward-Backward Error: Automatic Detection of Tracking Failures” by Z. Kalal, K. Mikolajczyk and Jiri Matas. The implementation is based on [MedianFlow].

The tracker is suitable for very smooth and predictable movements when object is visible throughout the whole sequence. It’s quite and accurate for this type of problems (in particular, it was shown by authors to outperform MIL). During the implementation period the code at http://www.aonsquared.co.uk/node/5, the courtesy of the author Arthur Amarra, was used for the reference purpose.

class TrackerMedianFlow

Implementation of TrackerMedianFlow from Tracker:

class CV_EXPORTS_W TrackerMedianFlow : public Tracker
{
 public:
  void read( const FileNode& fn );
  void write( FileStorage& fs ) const;
  static Ptr<trackerMedianFlow> createTracker(const trackerMedianFlow::Params &parameters=trackerMedianFlow::Params());
  virtual ~trackerMedianFlow(){};

 protected:
  bool initImpl( const Mat& image, const Rect2d& boundingBox );
  bool updateImpl( const Mat& image, Rect2d& boundingBox );
};

TrackerMedianFlow::Params

struct TrackerMedianFlow::Params

List of MedianFlow parameters:

struct CV_EXPORTS Params
{
 Params();
 int pointsInGrid; //square root of number of keypoints used; increase it to trade
                   //accurateness for speed; default value is sensible and recommended

 void read( const FileNode& fn );
 void write( FileStorage& fs ) const;
};

TrackerMedianFlow::createTracker

Constructor

C++: Ptr<trackerMedianFlow> TrackerMedianFlow::createTracker(const trackerMedianFlow::Params& parameters=trackerMedianFlow::Params())
Parameters:

TrackerTLD

TLD is a novel tracking framework that explicitly decomposes the long-term tracking task into tracking, learning and detection. The tracker follows the object from frame to frame. The detector localizes all appearances that have been observed so far and corrects the tracker if necessary. The learning estimates detector’s errors and updates it to avoid these errors in the future. The implementation is based on [TLD].

The Median Flow algorithm (see above) was chosen as a tracking component in this implementation, following authors. Tracker is supposed to be able to handle rapid motions, partial occlusions, object absence etc.

class TrackerTLD

Implementation of TrackerTLD from Tracker:

class CV_EXPORTS_W TrackerTLD : public Tracker
{
 public:
  void read( const FileNode& fn );
  void write( FileStorage& fs ) const;
  static Ptr<trackerTLD> createTracker(const trackerTLD::Params &parameters=trackerTLD::Params());
  virtual ~trackerTLD(){};

 protected:
  bool initImpl( const Mat& image, const Rect2d& boundingBox );
  bool updateImpl( const Mat& image, Rect2d& boundingBox );
};

TrackerTLD::Params

struct TrackerTLD::Params

List of TLD parameters:

struct CV_EXPORTS Params
{
 Params();

 void read( const FileNode& fn );
 void write( FileStorage& fs ) const;
};

TrackerTLD::createTracker

Constructor

C++: Ptr<trackerTLD> TrackerTLD::createTracker(const trackerTLD::Params& parameters=trackerTLD::Params())
Parameters: