[][src]Struct opencv::tracking::TrackerSamplerPF

pub struct TrackerSamplerPF { /* fields omitted */ }

This sampler is based on particle filtering.

In principle, it can be thought of as performing some sort of optimization (and indeed, this tracker uses opencv's optim module), where tracker seeks to find the rectangle in given frame, which is the most "similar" to the initial rectangle (the one, given through the constructor).

The optimization performed is stochastic and somehow resembles genetic algorithms, where on each new image received (submitted via TrackerSamplerPF::sampling()) we start with the region bounded by boundingBox, then generate several "perturbed" boxes, take the ones most similar to the original. This selection round is repeated several times. At the end, we hope that only the most promising box remaining, and these are combined to produce the subrectangle of image, which is put as a sole element in array sample.

It should be noted, that the definition of "similarity" between two rectangles is based on comparing their histograms. As experiments show, tracker is not very succesfull if target is assumed to strongly change its dimensions.

Implementations

impl TrackerSamplerPF[src]

impl TrackerSamplerPF[src]

pub fn new(
    chosen_rect: &Mat,
    parameters: &TrackerSamplerPF_Params
) -> Result<TrackerSamplerPF>
[src]

Constructor

Parameters

  • chosenRect: Initial rectangle, that is supposed to contain target we'd like to track.
  • parameters:

C++ default parameters

  • parameters: TrackerSamplerPF::Params()

Trait Implementations

impl Boxed for TrackerSamplerPF[src]

impl Drop for TrackerSamplerPF[src]

impl Send for TrackerSamplerPF[src]

impl TrackerSamplerAlgorithm for TrackerSamplerPF[src]

impl TrackerSamplerPFTrait for TrackerSamplerPF[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.