pub trait BinaryDescriptorMatcherTrait: AlgorithmTrait + BinaryDescriptorMatcherTraitConst {
// Required method
fn as_raw_mut_BinaryDescriptorMatcher(&mut self) -> *mut c_void;
// Provided methods
fn match_query(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<DMatch>,
masks: &Vector<Mat>,
) -> Result<()> { ... }
fn match_query_def(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<DMatch>,
) -> Result<()> { ... }
fn knn_match_query(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
k: i32,
masks: &Vector<Mat>,
compact_result: bool,
) -> Result<()> { ... }
fn knn_match_query_def(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
k: i32,
) -> Result<()> { ... }
fn radius_match_1(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
max_distance: f32,
masks: &Vector<Mat>,
compact_result: bool,
) -> Result<()> { ... }
fn radius_match_def_1(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
max_distance: f32,
) -> Result<()> { ... }
fn add(&mut self, descriptors: &Vector<Mat>) -> Result<()> { ... }
fn train(&mut self) -> Result<()> { ... }
fn clear(&mut self) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::line_descriptor::BinaryDescriptorMatcher
Required Methods§
fn as_raw_mut_BinaryDescriptorMatcher(&mut self) -> *mut c_void
Provided Methods§
Sourcefn match_query(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<DMatch>,
masks: &Vector<Mat>,
) -> Result<()>
fn match_query( &mut self, query_descriptors: &impl MatTraitConst, matches: &mut Vector<DMatch>, masks: &Vector<Mat>, ) -> Result<()>
For every input query descriptor, retrieve the best matching one from a dataset provided from user or from the one internal to class
§Parameters
- queryDescriptors: query descriptors
- trainDescriptors: dataset of descriptors furnished by user
- matches: vector to host retrieved matches
- mask: mask to select which input descriptors must be matched to one in dataset
§Overloaded parameters
- queryDescriptors: query descriptors
- matches: vector to host retrieved matches
- masks: vector of masks to select which input descriptors must be matched to one in dataset (the i-th mask in vector indicates whether each input query can be matched with descriptors in dataset relative to i-th image)
§C++ default parameters
- masks: std::vector
()
Sourcefn match_query_def(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<DMatch>,
) -> Result<()>
fn match_query_def( &mut self, query_descriptors: &impl MatTraitConst, matches: &mut Vector<DMatch>, ) -> Result<()>
@overload
§Parameters
- queryDescriptors: query descriptors
- matches: vector to host retrieved matches
- masks: vector of masks to select which input descriptors must be matched to one in dataset (the i-th mask in vector indicates whether each input query can be matched with descriptors in dataset relative to i-th image)
§Note
This alternative version of BinaryDescriptorMatcherTrait::match_query function uses the following default values for its arguments:
- masks: std::vector
()
Sourcefn knn_match_query(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
k: i32,
masks: &Vector<Mat>,
compact_result: bool,
) -> Result<()>
fn knn_match_query( &mut self, query_descriptors: &impl MatTraitConst, matches: &mut Vector<Vector<DMatch>>, k: i32, masks: &Vector<Mat>, compact_result: bool, ) -> Result<()>
For every input query descriptor, retrieve the best k matching ones from a dataset provided from user or from the one internal to class
§Parameters
- queryDescriptors: query descriptors
- trainDescriptors: dataset of descriptors furnished by user
- matches: vector to host retrieved matches
- k: number of the closest descriptors to be returned for every input query
- mask: mask to select which input descriptors must be matched to ones in dataset
- compactResult: flag to obtain a compact result (if true, a vector that doesn’t contain any matches for a given query is not inserted in final result)
§Overloaded parameters
- queryDescriptors: query descriptors
- matches: vector to host retrieved matches
- k: number of the closest descriptors to be returned for every input query
- masks: vector of masks to select which input descriptors must be matched to ones in dataset (the i-th mask in vector indicates whether each input query can be matched with descriptors in dataset relative to i-th image)
- compactResult: flag to obtain a compact result (if true, a vector that doesn’t contain any matches for a given query is not inserted in final result)
§C++ default parameters
- masks: std::vector
() - compact_result: false
Sourcefn knn_match_query_def(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
k: i32,
) -> Result<()>
fn knn_match_query_def( &mut self, query_descriptors: &impl MatTraitConst, matches: &mut Vector<Vector<DMatch>>, k: i32, ) -> Result<()>
@overload
§Parameters
- queryDescriptors: query descriptors
- matches: vector to host retrieved matches
- k: number of the closest descriptors to be returned for every input query
- masks: vector of masks to select which input descriptors must be matched to ones in dataset (the i-th mask in vector indicates whether each input query can be matched with descriptors in dataset relative to i-th image)
- compactResult: flag to obtain a compact result (if true, a vector that doesn’t contain any matches for a given query is not inserted in final result)
§Note
This alternative version of BinaryDescriptorMatcherTrait::knn_match_query function uses the following default values for its arguments:
- masks: std::vector
() - compact_result: false
Sourcefn radius_match_1(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
max_distance: f32,
masks: &Vector<Mat>,
compact_result: bool,
) -> Result<()>
fn radius_match_1( &mut self, query_descriptors: &impl MatTraitConst, matches: &mut Vector<Vector<DMatch>>, max_distance: f32, masks: &Vector<Mat>, compact_result: bool, ) -> Result<()>
For every input query descriptor, retrieve, from a dataset provided from user or from the one internal to class, all the descriptors that are not further than maxDist from input query
§Parameters
- queryDescriptors: query descriptors
- trainDescriptors: dataset of descriptors furnished by user
- matches: vector to host retrieved matches
- maxDistance: search radius
- mask: mask to select which input descriptors must be matched to ones in dataset
- compactResult: flag to obtain a compact result (if true, a vector that doesn’t contain any matches for a given query is not inserted in final result)
§Overloaded parameters
- queryDescriptors: query descriptors
- matches: vector to host retrieved matches
- maxDistance: search radius
- masks: vector of masks to select which input descriptors must be matched to ones in dataset (the i-th mask in vector indicates whether each input query can be matched with descriptors in dataset relative to i-th image)
- compactResult: flag to obtain a compact result (if true, a vector that doesn’t contain any matches for a given query is not inserted in final result)
§C++ default parameters
- masks: std::vector
() - compact_result: false
Sourcefn radius_match_def_1(
&mut self,
query_descriptors: &impl MatTraitConst,
matches: &mut Vector<Vector<DMatch>>,
max_distance: f32,
) -> Result<()>
fn radius_match_def_1( &mut self, query_descriptors: &impl MatTraitConst, matches: &mut Vector<Vector<DMatch>>, max_distance: f32, ) -> Result<()>
@overload
§Parameters
- queryDescriptors: query descriptors
- matches: vector to host retrieved matches
- maxDistance: search radius
- masks: vector of masks to select which input descriptors must be matched to ones in dataset (the i-th mask in vector indicates whether each input query can be matched with descriptors in dataset relative to i-th image)
- compactResult: flag to obtain a compact result (if true, a vector that doesn’t contain any matches for a given query is not inserted in final result)
§Note
This alternative version of [BinaryDescriptorMatcherTrait::radius_match] function uses the following default values for its arguments:
- masks: std::vector
() - compact_result: false
Sourcefn add(&mut self, descriptors: &Vector<Mat>) -> Result<()>
fn add(&mut self, descriptors: &Vector<Mat>) -> Result<()>
Store locally new descriptors to be inserted in dataset, without updating dataset.
§Parameters
- descriptors: matrices containing descriptors to be inserted into dataset
Note: Each matrix i in descriptors should contain descriptors relative to lines extracted from i-th image.
Sourcefn train(&mut self) -> Result<()>
fn train(&mut self) -> Result<()>
Update dataset by inserting into it all descriptors that were stored locally by add function.
Note: Every time this function is invoked, current dataset is deleted and locally stored descriptors are inserted into dataset. The locally stored copy of just inserted descriptors is then removed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.