pub trait BOWImgDescriptorExtractorTrait: BOWImgDescriptorExtractorTraitConst {
    // Required method
    fn as_raw_mut_BOWImgDescriptorExtractor(&mut self) -> *mut c_void;

    // Provided methods
    fn set_vocabulary(&mut self, vocabulary: &Mat) -> Result<()> { ... }
    fn compute_desc(
        &mut self,
        image: &dyn ToInputArray,
        keypoints: &mut Vector<KeyPoint>,
        img_descriptor: &mut dyn ToOutputArray,
        point_idxs_of_clusters: &mut Vector<Vector<i32>>,
        descriptors: &mut Mat
    ) -> Result<()> { ... }
    fn compute(
        &mut self,
        keypoint_descriptors: &dyn ToInputArray,
        img_descriptor: &mut dyn ToOutputArray,
        point_idxs_of_clusters: &mut Vector<Vector<i32>>
    ) -> Result<()> { ... }
    fn compute2(
        &mut self,
        image: &Mat,
        keypoints: &mut Vector<KeyPoint>,
        img_descriptor: &mut Mat
    ) -> Result<()> { ... }
}
Expand description

Required Methods§

Provided Methods§

source

fn set_vocabulary(&mut self, vocabulary: &Mat) -> Result<()>

Sets a visual vocabulary.

Parameters
  • vocabulary: Vocabulary (can be trained using the inheritor of BOWTrainer ). Each row of the vocabulary is a visual word (cluster center).
source

fn compute_desc( &mut self, image: &dyn ToInputArray, keypoints: &mut Vector<KeyPoint>, img_descriptor: &mut dyn ToOutputArray, point_idxs_of_clusters: &mut Vector<Vector<i32>>, descriptors: &mut Mat ) -> Result<()>

Computes an image descriptor using the set visual vocabulary.

Parameters
  • image: Image, for which the descriptor is computed.
  • keypoints: Keypoints detected in the input image.
  • imgDescriptor: Computed output image descriptor.
  • pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) returned if it is non-zero.
  • descriptors: Descriptors of the image keypoints that are returned if they are non-zero.
C++ default parameters
  • point_idxs_of_clusters: 0
  • descriptors: 0
source

fn compute( &mut self, keypoint_descriptors: &dyn ToInputArray, img_descriptor: &mut dyn ToOutputArray, point_idxs_of_clusters: &mut Vector<Vector<i32>> ) -> Result<()>

Computes an image descriptor using the set visual vocabulary.

Parameters
  • image: Image, for which the descriptor is computed.
  • keypoints: Keypoints detected in the input image.
  • imgDescriptor: Computed output image descriptor.
  • pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) returned if it is non-zero.
  • descriptors: Descriptors of the image keypoints that are returned if they are non-zero.
Overloaded parameters
  • keypointDescriptors: Computed descriptors to match with vocabulary.
  • imgDescriptor: Computed output image descriptor.
  • pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) returned if it is non-zero.
C++ default parameters
  • point_idxs_of_clusters: 0
source

fn compute2( &mut self, image: &Mat, keypoints: &mut Vector<KeyPoint>, img_descriptor: &mut Mat ) -> Result<()>

Implementors§