OpenCV  4.1.0
Open Source Computer Vision
Public Member Functions | List of all members
cv::TrackerSampler Class Reference

Class that manages the sampler in order to select regions for the update the model of the tracker [AAM] Sampling e Labeling. See table I and section III B. More...

#include <opencv2/tracking/tracker.hpp>

Public Member Functions

 TrackerSampler ()
 Constructor.
 
 ~TrackerSampler ()
 Destructor.
 
bool addTrackerSamplerAlgorithm (String trackerSamplerAlgorithmType)
 Add TrackerSamplerAlgorithm in the collection. Return true if sampler is added, false otherwise.
 
bool addTrackerSamplerAlgorithm (Ptr< TrackerSamplerAlgorithm > &sampler)
 
const std::vector< std::pair
< String, Ptr
< TrackerSamplerAlgorithm > > > & 
getSamplers () const
 Return the collection of the TrackerSamplerAlgorithm.
 
const std::vector< Mat > & getSamples () const
 Return the samples from all TrackerSamplerAlgorithm,.
 
void sampling (const Mat &image, Rect boundingBox)
 Computes the regions starting from a position in an image.
 

Detailed Description

Class that manages the sampler in order to select regions for the update the model of the tracker [AAM] Sampling e Labeling. See table I and section III B.

Class that manages the sampler in order to select regions for the update the model of the tracker

AAM Sampling e Labeling. See table I and section III B

TrackerSampler is an aggregation of TrackerSamplerAlgorithm

See Also
TrackerSamplerAlgorithm

Constructor & Destructor Documentation

cv::TrackerSampler::TrackerSampler ( )

Constructor.

cv::TrackerSampler::~TrackerSampler ( )

Destructor.

Member Function Documentation

bool cv::TrackerSampler::addTrackerSamplerAlgorithm ( String  trackerSamplerAlgorithmType)

Add TrackerSamplerAlgorithm in the collection. Return true if sampler is added, false otherwise.

Parameters
trackerSamplerAlgorithmTypeThe TrackerSamplerAlgorithm name

The modes available now:

  • "CSC" – Current State Center
  • "CS" – Current State
  • "PF" – Particle Filtering

Example TrackerSamplerAlgorithm::addTrackerSamplerAlgorithm : :

TrackerSamplerCSC::Params CSCparameters;
Ptr<TrackerSamplerAlgorithm> CSCSampler = new TrackerSamplerCSC( CSCparameters );
if( !sampler->addTrackerSamplerAlgorithm( CSCSampler ) )
return false;
//or add CSC sampler with default parameters
//sampler->addTrackerSamplerAlgorithm( "CSC" );
Note
If you use the second method, you must initialize the TrackerSamplerAlgorithm
bool cv::TrackerSampler::addTrackerSamplerAlgorithm ( Ptr< TrackerSamplerAlgorithm > &  sampler)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
samplerThe TrackerSamplerAlgorithm
const std::vector<std::pair<String, Ptr<TrackerSamplerAlgorithm> > >& cv::TrackerSampler::getSamplers ( ) const

Return the collection of the TrackerSamplerAlgorithm.

const std::vector<Mat>& cv::TrackerSampler::getSamples ( ) const

Return the samples from all TrackerSamplerAlgorithm,.

AAM Fig. 1 variable Sk

void cv::TrackerSampler::sampling ( const Mat image,
Rect  boundingBox 
)

Computes the regions starting from a position in an image.

Parameters
imageThe current frame
boundingBoxThe bounding box from which regions can be calculated

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