OpenCV  3.0.0
Open Source Computer Vision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cv::Tracker Class Referenceabstract

Base abstract class for the long-term tracker: More...

#include "tracker.hpp"

Inheritance diagram for cv::Tracker:
cv::Algorithm cv::TrackerBoosting cv::TrackerMedianFlow cv::TrackerMIL cv::TrackerTLD

Public Member Functions

virtual ~Tracker ()
 
bool init (const Mat &image, const Rect2d &boundingBox)
 Initialize the tracker with a know bounding box that surrounding the target. More...
 
virtual void read (const FileNode &fn)=0
 Reads algorithm parameters from a file storage. More...
 
bool update (const Mat &image, Rect2d &boundingBox)
 Update the tracker, find the new most likely bounding box for the target. More...
 
virtual void write (FileStorage &fs) const =0
 Stores algorithm parameters in a file storage. More...
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
virtual String getDefaultName () const
 
virtual void save (const String &filename) const
 

Static Public Member Functions

static Ptr< Trackercreate (const String &trackerType)
 Creates a tracker by its name. More...
 
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file. More...
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String. More...
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node. More...
 

Protected Member Functions

virtual bool initImpl (const Mat &image, const Rect2d &boundingBox)=0
 
virtual bool updateImpl (const Mat &image, Rect2d &boundingBox)=0
 

Protected Attributes

Ptr< TrackerFeatureSetfeatureSet
 
bool isInit
 
Ptr< TrackerModelmodel
 
Ptr< TrackerSamplersampler
 

Detailed Description

Base abstract class for the long-term tracker:

Constructor & Destructor Documentation

virtual cv::Tracker::~Tracker ( )
virtual

Member Function Documentation

static Ptr<Tracker> cv::Tracker::create ( const String trackerType)
static

Creates a tracker by its name.

Parameters
trackerTypeTracker type

The following detector types are supported:

bool cv::Tracker::init ( const Mat image,
const Rect2d boundingBox 
)

Initialize the tracker with a know bounding box that surrounding the target.

Parameters
imageThe initial frame
boundingBoxThe initial boundig box
Returns
True if initialization went succesfully, false otherwise
virtual bool cv::Tracker::initImpl ( const Mat image,
const Rect2d boundingBox 
)
protectedpure virtual
virtual void cv::Tracker::read ( const FileNode fn)
pure virtual

Reads algorithm parameters from a file storage.

Reimplemented from cv::Algorithm.

bool cv::Tracker::update ( const Mat image,
Rect2d boundingBox 
)

Update the tracker, find the new most likely bounding box for the target.

Parameters
imageThe current frame
boundingBoxThe boundig box that represent the new target location, if true was returned, not modified otherwise
Returns
True means that target was located and false means that tracker cannot locate target in current frame. Note, that latter does not imply that tracker has failed, maybe target is indeed missing from the frame (say, out of sight)
virtual bool cv::Tracker::updateImpl ( const Mat image,
Rect2d boundingBox 
)
protectedpure virtual
virtual void cv::Tracker::write ( FileStorage fs) const
pure virtual

Stores algorithm parameters in a file storage.

Reimplemented from cv::Algorithm.

Member Data Documentation

Ptr<TrackerFeatureSet> cv::Tracker::featureSet
protected
bool cv::Tracker::isInit
protected
Ptr<TrackerModel> cv::Tracker::model
protected
Ptr<TrackerSampler> cv::Tracker::sampler
protected

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