[][src]Trait opencv::hub_prelude::BOWTrainer

pub trait BOWTrainer {
    pub fn as_raw_BOWTrainer(&self) -> *const c_void;
pub fn as_raw_mut_BOWTrainer(&mut self) -> *mut c_void; pub fn add(&mut self, descriptors: &Mat) -> Result<()> { ... }
pub fn get_descriptors(&self) -> Result<Vector<Mat>> { ... }
pub fn descriptors_count(&self) -> Result<i32> { ... }
pub fn clear(&mut self) -> Result<()> { ... }
pub fn cluster(&self) -> Result<Mat> { ... }
pub fn cluster_with_descriptors(&self, descriptors: &Mat) -> Result<Mat> { ... } }

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

Loading content...

Provided methods

pub fn add(&mut self, descriptors: &Mat) -> Result<()>[src]

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.

pub fn get_descriptors(&self) -> Result<Vector<Mat>>[src]

Returns a training set of descriptors.

pub fn descriptors_count(&self) -> Result<i32>[src]

Returns the count of all descriptors stored in the training set.

pub fn clear(&mut self) -> Result<()>[src]

pub fn cluster(&self) -> Result<Mat>[src]

Clusters train descriptors.

Parameters

  • descriptors: Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.

The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object are clustered. In the second variant, input descriptors are clustered.

Overloaded parameters

pub fn cluster_with_descriptors(&self, descriptors: &Mat) -> Result<Mat>[src]

Clusters train descriptors.

Parameters

  • descriptors: Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.

The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object are clustered. In the second variant, input descriptors are clustered.

Loading content...

Implementors

Loading content...