| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Public Member Functions | List of all members
cv::detail::tracking::TrackerContribSampler Class Reference
Tracking API » Tracking API implementation details

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/tracking_internals.hpp>`

Collaboration diagram for cv::detail::tracking::TrackerContribSampler:

## Public Member Functions
| TrackerContribSampler ()
| Constructor.
| ~TrackerContribSampler ()
| Destructor.
bool | addTrackerSamplerAlgorithm (Ptr< TrackerContribSamplerAlgorithm > &sampler)
bool | addTrackerSamplerAlgorithm (String trackerSamplerAlgorithmType)
| Add TrackerContribSamplerAlgorithm in the collection. Return true if sampler is added, false otherwise.
const std::vector< std::pair< String, Ptr< TrackerContribSamplerAlgorithm > > > & | getSamplers () const
| Return the collection of the TrackerContribSamplerAlgorithm.
const std::vector< Mat > & | getSamples () const
| Return the samples from all TrackerContribSamplerAlgorithm, [233] Fig. 1 variable Sk.
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

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

TrackerContribSampler is an aggregation of TrackerContribSamplerAlgorithm

See also
  TrackerContribSamplerAlgorithm

## Constructor & Destructor Documentation

## ◆ TrackerContribSampler()

cv::detail::tracking::TrackerContribSampler::TrackerContribSampler | ( |  | ) |

Constructor.

## ◆ ~TrackerContribSampler()

cv::detail::tracking::TrackerContribSampler::~TrackerContribSampler | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ addTrackerSamplerAlgorithm() [1/2]

bool cv::detail::tracking::TrackerContribSampler::addTrackerSamplerAlgorithm | ( | Ptr< TrackerContribSamplerAlgorithm > & | sampler | ) |

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

Parameters

  sampler | The TrackerContribSamplerAlgorithm

## ◆ addTrackerSamplerAlgorithm() [2/2]

bool cv::detail::tracking::TrackerContribSampler::addTrackerSamplerAlgorithm | ( | String | trackerSamplerAlgorithmType | ) |

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

Parameters

  trackerSamplerAlgorithmType | The TrackerContribSamplerAlgorithm name

The modes available now:

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

Example TrackerContribSamplerAlgorithm::addTrackerContribSamplerAlgorithm : :

TrackerContribSamplerCSC::Params CSCparameters;
Ptr<TrackerContribSamplerAlgorithm> CSCSampler = new TrackerContribSamplerCSC( CSCparameters );
if( !sampler->addTrackerSamplerAlgorithm( CSCSampler ) )
return false;
//or add CSC sampler with default parameters
//sampler->addTrackerSamplerAlgorithm( "CSC" );
cv::detail::tracking::TrackerContribSamplerCSC
TrackerSampler based on CSC (current state centered), used by MIL algorithm TrackerMIL.
Definition tracking_internals.hpp:642
cv::Ptr
std::shared_ptr< _Tp > Ptr
Definition cvstd_wrapper.hpp:23
cv::detail::tracking::TrackerContribSamplerCSC::Params
Definition tracking_internals.hpp:654

Note
  If you use the second method, you must initialize the TrackerContribSamplerAlgorithm

## ◆ getSamplers()

const std::vector< std::pair< String, Ptr< TrackerContribSamplerAlgorithm > > > & cv::detail::tracking::TrackerContribSampler::getSamplers | ( |  | ) | const

Return the collection of the TrackerContribSamplerAlgorithm.

## ◆ getSamples()

const std::vector< Mat > & cv::detail::tracking::TrackerContribSampler::getSamples | ( |  | ) | const

Return the samples from all TrackerContribSamplerAlgorithm, [233] Fig. 1 variable Sk.

## ◆ sampling()

void cv::detail::tracking::TrackerContribSampler::sampling | ( | const Mat & | image,
|  | Rect | boundingBox )

Computes the regions starting from a position in an image.

Parameters

  image | The current frame
  boundingBox | The bounding box from which regions can be calculated

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

- opencv2/tracking/tracking_internals.hpp