[][src]Trait opencv::tracking::prelude::Tracker

pub trait Tracker: AlgorithmTrait {
    fn as_raw_Tracker(&self) -> *const c_void;
fn as_raw_mut_Tracker(&mut self) -> *mut c_void; fn init(
        &mut self,
        image: &dyn ToInputArray,
        bounding_box: Rect2d
    ) -> Result<bool> { ... }
fn update(
        &mut self,
        image: &dyn ToInputArray,
        bounding_box: &mut Rect2d
    ) -> Result<bool> { ... }
fn read(&mut self, fn_: &FileNode) -> Result<()> { ... }
fn write(&self, fs: &mut FileStorage) -> Result<()> { ... } }

Base abstract class for the long-term tracker:

Required methods

Loading content...

Provided methods

fn init(
    &mut self,
    image: &dyn ToInputArray,
    bounding_box: Rect2d
) -> Result<bool>

Initialize the tracker with a known bounding box that surrounded the target

Parameters

  • image: The initial frame
  • boundingBox: The initial bounding box

Returns

True if initialization went succesfully, false otherwise

fn update(
    &mut self,
    image: &dyn ToInputArray,
    bounding_box: &mut Rect2d
) -> Result<bool>

Update the tracker, find the new most likely bounding box for the target

Parameters

  • image: The current frame
  • boundingBox: The bounding box that represent the new target location, if true was returned, not modified otherwise

Returns

True means that target was located and false means that tracker cannot locate target in current frame. Note, that latter does not imply that tracker has failed, maybe target is indeed missing from the frame (say, out of sight)

fn read(&mut self, fn_: &FileNode) -> Result<()>

fn write(&self, fs: &mut FileStorage) -> Result<()>

Loading content...

Implementors

Loading content...