pub trait BOWImgDescriptorExtractorTraitConst {
    fn as_raw_BOWImgDescriptorExtractor(&self) -> *const c_void;

    fn get_vocabulary(&self) -> Result<Mat> { ... }
    fn descriptor_size(&self) -> Result<i32> { ... }
    fn descriptor_type(&self) -> Result<i32> { ... }
}
Expand description

Class to compute an image descriptor using the bag of visual words.

Such a computation consists of the following steps:

  1. Compute descriptors for a given image and its keypoints set.
  2. Find the nearest visual words from the vocabulary for each keypoint descriptor.
  3. Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words encountered in the image. The i-th bin of the histogram is a frequency of i-th word of the vocabulary in the given image.

Required Methods

Provided Methods

Returns the set vocabulary.

Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.

Returns an image descriptor type.

Implementors