OpenCV  3.2.0
Open Source Computer Vision
Public Member Functions | Public Attributes | Protected Attributes | List of all members
cv::MultiTracker Class Reference

This class is used to track multiple objects using the specified tracker algorithm. The MultiTracker is naive implementation of multiple object tracking. It process the tracked objects independently without any optimization accross the tracked objects. More...

#include "tracker.hpp"

Public Member Functions

 MultiTracker (const String &trackerType="")
 Constructor. In the case of trackerType is given, it will be set as the default algorithm for all trackers. More...
 
 ~MultiTracker ()
 Destructor. More...
 
bool add (const Mat &image, const Rect2d &boundingBox)
 Add a new object to be tracked. The defaultAlgorithm will be used the newly added tracker. More...
 
bool add (const String &trackerType, const Mat &image, const Rect2d &boundingBox)
 Add a new object to be tracked. More...
 
bool add (const String &trackerType, const Mat &image, std::vector< Rect2d > boundingBox)
 Add a set of objects to be tracked. More...
 
bool add (const Mat &image, std::vector< Rect2d > boundingBox)
 Add a set of objects to be tracked using the defaultAlgorithm tracker. More...
 
bool update (const Mat &image)
 Update the current tracking status. The result will be saved in the internal storage. More...
 
bool update (const Mat &image, std::vector< Rect2d > &boundingBox)
 Update the current tracking status. More...
 

Public Attributes

std::vector< Rect2dobjects
 

Protected Attributes

String defaultAlgorithm
 
std::vector< Ptr< Tracker > > trackerList
 < storage for the tracker algorithms. More...
 

Detailed Description

This class is used to track multiple objects using the specified tracker algorithm. The MultiTracker is naive implementation of multiple object tracking. It process the tracked objects independently without any optimization accross the tracked objects.

Constructor & Destructor Documentation

§ MultiTracker()

cv::MultiTracker::MultiTracker ( const String trackerType = "")

Constructor. In the case of trackerType is given, it will be set as the default algorithm for all trackers.

Parameters
trackerTypethe name of the tracker algorithm to be used

§ ~MultiTracker()

cv::MultiTracker::~MultiTracker ( )

Destructor.

Member Function Documentation

§ add() [1/4]

bool cv::MultiTracker::add ( const Mat image,
const Rect2d boundingBox 
)

Add a new object to be tracked. The defaultAlgorithm will be used the newly added tracker.

Parameters
imageinput image
boundingBoxa rectangle represents ROI of the tracked object

§ add() [2/4]

bool cv::MultiTracker::add ( const String trackerType,
const Mat image,
const Rect2d boundingBox 
)

Add a new object to be tracked.

Parameters
trackerTypethe name of the tracker algorithm to be used
imageinput image
boundingBoxa rectangle represents ROI of the tracked object

§ add() [3/4]

bool cv::MultiTracker::add ( const String trackerType,
const Mat image,
std::vector< Rect2d boundingBox 
)

Add a set of objects to be tracked.

Parameters
trackerTypethe name of the tracker algorithm to be used
imageinput image
boundingBoxlist of the tracked objects

§ add() [4/4]

bool cv::MultiTracker::add ( const Mat image,
std::vector< Rect2d boundingBox 
)

Add a set of objects to be tracked using the defaultAlgorithm tracker.

Parameters
imageinput image
boundingBoxlist of the tracked objects

§ update() [1/2]

bool cv::MultiTracker::update ( const Mat image)

Update the current tracking status. The result will be saved in the internal storage.

Parameters
imageinput imagestorage for the tracked objects, each object corresponds to one tracker algorithm.

§ update() [2/2]

bool cv::MultiTracker::update ( const Mat image,
std::vector< Rect2d > &  boundingBox 
)

Update the current tracking status.

Parameters
imageinput image
boundingBoxthe tracking result, represent a list of ROIs of the tracked objects.

Member Data Documentation

§ defaultAlgorithm

String cv::MultiTracker::defaultAlgorithm
protected

§ objects

std::vector<Rect2d> cv::MultiTracker::objects

§ trackerList

std::vector< Ptr<Tracker> > cv::MultiTracker::trackerList
protected

< storage for the tracker algorithms.

default algorithm for the tracking method.


The documentation for this class was generated from the following file: