pub trait BOWImgDescriptorExtractorTrait: BOWImgDescriptorExtractorTraitConst {
// Required method
fn as_raw_mut_BOWImgDescriptorExtractor(&mut self) -> *mut c_void;
// Provided methods
fn set_vocabulary(&mut self, vocabulary: &impl MatTraitConst) -> Result<()> { ... }
fn compute_desc(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut impl ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>,
descriptors: &mut impl MatTrait
) -> Result<()> { ... }
fn compute_desc_def(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut impl ToOutputArray
) -> Result<()> { ... }
fn compute(
&mut self,
keypoint_descriptors: &impl ToInputArray,
img_descriptor: &mut impl ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>
) -> Result<()> { ... }
fn compute_def(
&mut self,
keypoint_descriptors: &impl ToInputArray,
img_descriptor: &mut impl ToOutputArray
) -> Result<()> { ... }
fn compute2(
&mut self,
image: &impl MatTraitConst,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut impl MatTrait
) -> Result<()> { ... }
}Expand description
Mutable methods for crate::features2d::BOWImgDescriptorExtractor
Required Methods§
fn as_raw_mut_BOWImgDescriptorExtractor(&mut self) -> *mut c_void
Provided Methods§
sourcefn set_vocabulary(&mut self, vocabulary: &impl MatTraitConst) -> Result<()>
fn set_vocabulary(&mut self, vocabulary: &impl MatTraitConst) -> 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).
sourcefn compute_desc(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut impl ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>,
descriptors: &mut impl MatTrait
) -> Result<()>
fn compute_desc( &mut self, image: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, img_descriptor: &mut impl ToOutputArray, point_idxs_of_clusters: &mut Vector<Vector<i32>>, descriptors: &mut impl MatTrait ) -> 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
sourcefn compute_desc_def(
&mut self,
image: &impl ToInputArray,
keypoints: &mut Vector<KeyPoint>,
img_descriptor: &mut impl ToOutputArray
) -> Result<()>
fn compute_desc_def( &mut self, image: &impl ToInputArray, keypoints: &mut Vector<KeyPoint>, img_descriptor: &mut impl ToOutputArray ) -> 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.
§Note
This alternative version of BOWImgDescriptorExtractorTrait::compute_desc function uses the following default values for its arguments:
- point_idxs_of_clusters: 0
- descriptors: 0
sourcefn compute(
&mut self,
keypoint_descriptors: &impl ToInputArray,
img_descriptor: &mut impl ToOutputArray,
point_idxs_of_clusters: &mut Vector<Vector<i32>>
) -> Result<()>
fn compute( &mut self, keypoint_descriptors: &impl ToInputArray, img_descriptor: &mut impl 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
sourcefn compute_def(
&mut self,
keypoint_descriptors: &impl ToInputArray,
img_descriptor: &mut impl ToOutputArray
) -> Result<()>
fn compute_def( &mut self, keypoint_descriptors: &impl ToInputArray, img_descriptor: &mut impl ToOutputArray ) -> Result<()>
@overload
§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.
§Note
This alternative version of BOWImgDescriptorExtractorTrait::compute function uses the following default values for its arguments:
- point_idxs_of_clusters: 0
fn compute2( &mut self, image: &impl MatTraitConst, keypoints: &mut Vector<KeyPoint>, img_descriptor: &mut impl MatTrait ) -> Result<()>
Object Safety§
This trait is not object safe.