OpenCV  4.1.0
Open Source Computer Vision
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
cv::TrackerKCF Class Referenceabstract

the KCF (Kernelized Correlation Filter) tracker More...

#include <opencv2/tracking/tracker.hpp>

Inheritance diagram for cv::TrackerKCF:
cv::Tracker cv::Algorithm


struct  Params

Public Types

enum  MODE {
  GRAY = (1 << 0),
  CN = (1 << 1),
  CUSTOM = (1 << 2)
 Feature type to be used in the tracking grayscale, colornames, compressed color-names The modes available now: More...

Public Member Functions

virtual ~TrackerKCF () CV_OVERRIDE
virtual void setFeatureExtractor (void(*)(const Mat, const Rect, Mat &), bool pca_func=false)=0
- Public Member Functions inherited from cv::Tracker
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
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
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 bindingsThis is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Static Public Member Functions

static Ptr< TrackerKCFcreate (const TrackerKCF::Params &parameters)
static Ptr< TrackerKCFcreate ()

Additional Inherited Members

- Protected Member Functions inherited from cv::Tracker
virtual bool initImpl (const Mat &image, const Rect2d &boundingBox)=0
virtual bool updateImpl (const Mat &image, Rect2d &boundingBox)=0
- Protected Attributes inherited from cv::Tracker
Ptr< TrackerFeatureSetfeatureSet
bool isInit
Ptr< TrackerModelmodel
Ptr< TrackerSamplersampler

Detailed Description

the KCF (Kernelized Correlation Filter) tracker

KCF is a novel tracking framework that utilizes properties of circulant matrix to enhance the processing speed. This tracking method is an implementation ofKCF_ECCV which is extended to KCF with color-names features (KCF_CN). The original paper of KCF is available at as well as the matlab implementation. For more information about KCF with color-names features, please refer to

Member Enumeration Documentation

Feature type to be used in the tracking grayscale, colornames, compressed color-names The modes available now:

  • "GRAY" – Use grayscale values as the feature
  • "CN" – Color-names feature

Constructor & Destructor Documentation

virtual cv::TrackerKCF::~TrackerKCF ( )

Member Function Documentation

static Ptr<TrackerKCF> cv::TrackerKCF::create ( const TrackerKCF::Params parameters)


parametersKCF parameters TrackerKCF::Params
static Ptr<TrackerKCF> cv::TrackerKCF::create ( )
virtual void cv::TrackerKCF::setFeatureExtractor ( void(*)(const Mat, const Rect, Mat &)  ,
bool  pca_func = false 
pure virtual

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