OpenCV  4.5.1
Open Source Computer Vision
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cv::legacy::Tracker Class Referenceabstract

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

#include <opencv2/tracking/tracking_legacy.hpp>

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

Public Member Functions

 Tracker ()
 
virtual ~Tracker () CV_OVERRIDE
 
bool init (InputArray image, const Rect2d &boundingBox)
 Initialize the tracker with a known bounding box that surrounded the target. More...
 
virtual void read (const FileNode &fn) CV_OVERRIDE=0
 Reads algorithm parameters from a file storage. More...
 
bool update (InputArray image, Rect2d &boundingBox)
 Update the tracker, find the new most likely bounding box for the target. More...
 
virtual void write (FileStorage &fs) const CV_OVERRIDE=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
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) 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. More...
 

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< TrackerContribFeatureSetfeatureSet
 
bool isInit
 
Ptr< TrackerModelmodel
 
Ptr< TrackerContribSamplersampler
 

Additional Inherited Members

- 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...
 

Detailed Description

Base abstract class for the long-term tracker:

Constructor & Destructor Documentation

◆ Tracker()

cv::legacy::Tracker::Tracker ( )

◆ ~Tracker()

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

Member Function Documentation

◆ init()

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

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

Parameters
imageThe initial frame
boundingBoxThe initial bounding box
Returns
True if initialization went succesfully, false otherwise

◆ initImpl()

virtual bool cv::legacy::Tracker::initImpl ( const Mat image,
const Rect2d boundingBox 
)
protectedpure virtual

◆ read()

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

Reads algorithm parameters from a file storage.

Reimplemented from cv::Algorithm.

◆ update()

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

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

Parameters
imageThe current frame
boundingBoxThe bounding 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)

◆ updateImpl()

virtual bool cv::legacy::Tracker::updateImpl ( const Mat image,
Rect2d boundingBox 
)
protectedpure virtual

◆ write()

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

Stores algorithm parameters in a file storage.

Reimplemented from cv::Algorithm.

Member Data Documentation

◆ featureSet

Ptr<TrackerContribFeatureSet> cv::legacy::Tracker::featureSet
protected

◆ isInit

bool cv::legacy::Tracker::isInit
protected

◆ model

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

◆ sampler

Ptr<TrackerContribSampler> cv::legacy::Tracker::sampler
protected

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