Trait opencv::prelude::BOWTrainerTraitConst
source · pub trait BOWTrainerTraitConst {
// Required method
fn as_raw_BOWTrainer(&self) -> *const c_void;
// Provided methods
fn get_descriptors(&self) -> Result<Vector<Mat>> { ... }
fn descriptors_count(&self) -> Result<i32> { ... }
fn cluster(&self) -> Result<Mat> { ... }
fn cluster_with_descriptors(&self, descriptors: &Mat) -> Result<Mat> { ... }
}
Expand description
Constant methods for crate::features2d::BOWTrainer
Required Methods§
fn as_raw_BOWTrainer(&self) -> *const c_void
Provided Methods§
sourcefn get_descriptors(&self) -> Result<Vector<Mat>>
fn get_descriptors(&self) -> Result<Vector<Mat>>
Returns a training set of descriptors.
sourcefn descriptors_count(&self) -> Result<i32>
fn descriptors_count(&self) -> Result<i32>
Returns the count of all descriptors stored in the training set.
sourcefn cluster(&self) -> Result<Mat>
fn cluster(&self) -> Result<Mat>
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
sourcefn cluster_with_descriptors(&self, descriptors: &Mat) -> Result<Mat>
fn cluster_with_descriptors(&self, descriptors: &Mat) -> Result<Mat>
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.