cv::Tracker Class Reference abstract
跟踪 API

Base abstract class for the long-term tracker: 更多...

#include <opencv2/tracking/tracker.hpp>

Inheritance diagram for cv::Tracker:
cv::Algorithm cv::TrackerBoosting cv::TrackerCSRT cv::TrackerGOTURN cv::TrackerKCF cv::TrackerMedianFlow cv::TrackerMIL cv::TrackerMOSSE cv::TrackerTLD

Public Member Functions

virtual ~Tracker () CV_OVERRIDE
bool init ( InputArray image, const Rect2d &boundingBox)
Initialize the tracker with a known bounding box that surrounded the target. 更多...
virtual void read (const FileNode &fn) CV_OVERRIDE =0
Reads algorithm parameters from a file storage. 更多...
bool update ( InputArray image, Rect2d &boundingBox)
Update the tracker, find the new most likely bounding box for the target. 更多...
virtual void write ( FileStorage &fs) const CV_OVERRIDE =0
Stores algorithm parameters in a file storage. 更多...
- Public Member Functions inherited from cv::Algorithm
Algorithm ()
virtual ~Algorithm ()
virtual void clear ()
Clears the algorithm state. 更多...
virtual bool empty () const
返回 true 若 Algorithm is empty (e.g. in the very beginning or after unsuccessful read. 更多...
virtual 字符串 getDefaultName () const
virtual void save (const 字符串 &filename) const
void write (const Ptr < FileStorage > &fs, const 字符串 &name= 字符串 ()) const
simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 更多...

Protected Member Functions

virtual bool initImpl (const Mat &image, const Rect2d &boundingBox)=0
virtual bool updateImpl (const Mat &image, Rect2d &boundingBox)=0
- Protected Member Functions inherited from cv::Algorithm
void writeFormat ( FileStorage &fs) const

Protected Attributes

Ptr < TrackerFeatureSet > featureSet
bool isInit
Ptr < TrackerModel > model
Ptr < TrackerSampler > sampler

额外继承成员

- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr < _Tp > load (const 字符串 &filename, const 字符串 &objname= 字符串 ())
Loads algorithm from the file. 更多...
template<typename _Tp >
static Ptr < _Tp > loadFromString (const 字符串 &strModel, const 字符串 &objname= 字符串 ())
Loads algorithm from a String. 更多...
template<typename _Tp >
static Ptr < _Tp > read (const FileNode &fn)
Reads algorithm from the file node. 更多...

详细描述

Base abstract class for the long-term tracker:

Constructor & Destructor Documentation

~Tracker()

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

成员函数文档编制

init()

bool cv::Tracker::init ( InputArray image ,
const Rect2d & boundingBox
)
Python:
retval = cv.Tracker.init( image, boundingBox )

Initialize the tracker with a known bounding box that surrounded the target.

参数
image The initial frame
boundingBox The initial bounding box
返回
True if initialization went succesfully, false otherwise

initImpl()

virtual bool cv::Tracker::initImpl ( const Mat & image ,
const Rect2d & boundingBox
)
protected pure virtual

read()

virtual void cv::Tracker::read ( const FileNode & fn )
pure virtual

Reads algorithm parameters from a file storage.

Reimplemented from cv::Algorithm .

update()

bool cv::Tracker::update ( InputArray image ,
Rect2d & boundingBox
)
Python:
retval, boundingBox = cv.Tracker.update( image )

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

参数
image The current frame
boundingBox The bounding box that represent the new target location, if true was returned, not modified otherwise
返回
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)

updateImpl()

virtual bool cv::Tracker::updateImpl ( const Mat & image ,
Rect2d & boundingBox
)
protected pure virtual

write()

virtual void cv::Tracker::write ( FileStorage & fs ) const
pure virtual

Stores algorithm parameters in a file storage.

Reimplemented from cv::Algorithm .

Member Data Documentation

featureSet

Ptr < TrackerFeatureSet > cv::Tracker::featureSet
protected

isInit

bool cv::Tracker::isInit
protected

model

Ptr < TrackerModel > cv::Tracker::model
protected

sampler

Ptr < TrackerSampler > cv::Tracker::sampler
protected

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