pub trait BOWTrainer: BOWTrainerConst {
    // Required method
    fn as_raw_mut_BOWTrainer(&mut self) -> *mut c_void;

    // Provided methods
    fn add(&mut self, descriptors: &Mat) -> Result<()> { ... }
    fn clear(&mut self) -> Result<()> { ... }
}
Expand description

Abstract base class for training the bag of visual words vocabulary from a set of descriptors.

For details, see, for example, Visual Categorization with Bags of Keypoints by Gabriella Csurka, Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :

Required Methods§

Provided Methods§

source

fn add(&mut self, descriptors: &Mat) -> Result<()>

Adds descriptors to a training set.

Parameters
  • descriptors: Descriptors to add to a training set. Each row of the descriptors matrix is a descriptor.

The training set is clustered using clustermethod to construct the vocabulary.

source

fn clear(&mut self) -> Result<()>

Implementors§