OpenCV  4.0.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 "tracker.hpp"

Public Member Functions

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

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

[171] Sampling e Labeling. See table I and section III B

TrackerSampler is an aggregation of TrackerSamplerAlgorithm

See also
TrackerSamplerAlgorithm

Constructor & Destructor Documentation

§ TrackerSampler()

cv::TrackerSampler::TrackerSampler ( )

Constructor.

§ ~TrackerSampler()

cv::TrackerSampler::~TrackerSampler ( )

Destructor.

Member Function Documentation

§ addTrackerSamplerAlgorithm() [1/2]

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

§ addTrackerSamplerAlgorithm() [2/2]

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

§ getSamplers()

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

Return the collection of the TrackerSamplerAlgorithm.

§ getSamples()

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

Return the samples from all TrackerSamplerAlgorithm, [171] Fig. 1 variable Sk.

§ sampling()

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: