Struct opencv::cudafeatures2d::CUDA_DescriptorMatcher

source ·
pub struct CUDA_DescriptorMatcher { /* private fields */ }
Expand description

Abstract base class for matching keypoint descriptors.

It has two groups of match methods: for matching descriptors of an image with another image or with an image set.

Implementations§

source§

impl CUDA_DescriptorMatcher

source

pub fn create_bf_matcher(norm_type: i32) -> Result<Ptr<CUDA_DescriptorMatcher>>

Brute-force descriptor matcher.

For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches of descriptor sets.

§Parameters
  • normType: One of NORM_L1, NORM_L2, NORM_HAMMING. L1 and L2 norms are preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and BRIEF).
§C++ default parameters
  • norm_type: cv::NORM_L2
source

pub fn create_bf_matcher_def() -> Result<Ptr<CUDA_DescriptorMatcher>>

Brute-force descriptor matcher.

For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches of descriptor sets.

§Parameters
  • normType: One of NORM_L1, NORM_L2, NORM_HAMMING. L1 and L2 norms are preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and BRIEF).
§Note

This alternative version of CUDA_DescriptorMatcher::create_bf_matcher function uses the following default values for its arguments:

  • norm_type: cv::NORM_L2

Trait Implementations§

source§

impl AlgorithmTrait for CUDA_DescriptorMatcher

source§

fn as_raw_mut_Algorithm(&mut self) -> *mut c_void

source§

fn clear(&mut self) -> Result<()>

Clears the algorithm state
source§

fn read(&mut self, fn_: &impl FileNodeTraitConst) -> Result<()>

Reads algorithm parameters from a file storage
source§

impl AlgorithmTraitConst for CUDA_DescriptorMatcher

source§

fn as_raw_Algorithm(&self) -> *const c_void

source§

fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>

Stores algorithm parameters in a file storage
source§

fn write_1(&self, fs: &mut impl FileStorageTrait, name: &str) -> Result<()>

Stores algorithm parameters in a file storage Read more
source§

fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>

@deprecated Read more
source§

fn write_with_name_def(&self, fs: &Ptr<FileStorage>) -> Result<()>

👎Deprecated:

§Note

Deprecated: ## Note This alternative version of AlgorithmTraitConst::write_with_name function uses the following default values for its arguments: Read more
source§

fn empty(&self) -> Result<bool>

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
source§

fn save(&self, filename: &str) -> Result<()>

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
source§

fn get_default_name(&self) -> Result<String>

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
source§

impl Boxed for CUDA_DescriptorMatcher

source§

unsafe fn from_raw( ptr: <CUDA_DescriptorMatcher as OpenCVFromExtern>::ExternReceive ) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw( self ) -> <CUDA_DescriptorMatcher as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw( &self ) -> <CUDA_DescriptorMatcher as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
source§

fn as_raw_mut( &mut self ) -> <CUDA_DescriptorMatcher as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
source§

impl CUDA_DescriptorMatcherTrait for CUDA_DescriptorMatcher

source§

fn as_raw_mut_CUDA_DescriptorMatcher(&mut self) -> *mut c_void

source§

fn add(&mut self, descriptors: &Vector<GpuMat>) -> Result<()>

Adds descriptors to train a descriptor collection. Read more
source§

fn clear(&mut self) -> Result<()>

Clears the train descriptor collection.
source§

fn train(&mut self) -> Result<()>

Trains a descriptor matcher. Read more
source§

fn match_( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut Vector<DMatch>, mask: &impl ToInputArray ) -> Result<()>

Finds the best match for each descriptor from a query set (blocking version). Read more
source§

fn match__def( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut Vector<DMatch> ) -> Result<()>

Finds the best match for each descriptor from a query set (blocking version). Read more
source§

fn match__1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut Vector<DMatch>, masks: &Vector<GpuMat> ) -> Result<()>

Finds the best match for each descriptor from a query set (blocking version). Read more
source§

fn match__def_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut Vector<DMatch> ) -> Result<()>

@overload Read more
source§

fn match_async( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, mask: &impl ToInputArray, stream: &mut impl StreamTrait ) -> Result<()>

Finds the best match for each descriptor from a query set (asynchronous version). Read more
source§

fn match_async_def( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray ) -> Result<()>

Finds the best match for each descriptor from a query set (asynchronous version). Read more
source§

fn match_async_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, masks: &Vector<GpuMat>, stream: &mut impl StreamTrait ) -> Result<()>

Finds the best match for each descriptor from a query set (asynchronous version). Read more
source§

fn match_async_def_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray ) -> Result<()>

@overload Read more
source§

fn match_convert( &mut self, gpu_matches: &impl ToInputArray, matches: &mut Vector<DMatch> ) -> Result<()>

Converts matches array from internal representation to standard matches vector. Read more
source§

fn knn_match( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, k: i32, mask: &impl ToInputArray, compact_result: bool ) -> Result<()>

Finds the k best matches for each descriptor from a query set (blocking version). Read more
source§

fn knn_match_def( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, k: i32 ) -> Result<()>

Finds the k best matches for each descriptor from a query set (blocking version). Read more
source§

fn knn_match_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, k: i32, masks: &Vector<GpuMat>, compact_result: bool ) -> Result<()>

Finds the k best matches for each descriptor from a query set (blocking version). Read more
source§

fn knn_match_def_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, k: i32 ) -> Result<()>

@overload Read more
source§

fn knn_match_async( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, k: i32, mask: &impl ToInputArray, stream: &mut impl StreamTrait ) -> Result<()>

Finds the k best matches for each descriptor from a query set (asynchronous version). Read more
source§

fn knn_match_async_def( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, k: i32 ) -> Result<()>

Finds the k best matches for each descriptor from a query set (asynchronous version). Read more
source§

fn knn_match_async_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, k: i32, masks: &Vector<GpuMat>, stream: &mut impl StreamTrait ) -> Result<()>

Finds the k best matches for each descriptor from a query set (asynchronous version). Read more
source§

fn knn_match_async_def_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, k: i32 ) -> Result<()>

@overload Read more
source§

fn knn_match_convert( &mut self, gpu_matches: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, compact_result: bool ) -> Result<()>

Converts matches array from internal representation to standard matches vector. Read more
source§

fn knn_match_convert_def( &mut self, gpu_matches: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>> ) -> Result<()>

Converts matches array from internal representation to standard matches vector. Read more
source§

fn radius_match( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, max_distance: f32, mask: &impl ToInputArray, compact_result: bool ) -> Result<()>

For each query descriptor, finds the training descriptors not farther than the specified distance (blocking version). Read more
source§

fn radius_match_def( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, max_distance: f32 ) -> Result<()>

For each query descriptor, finds the training descriptors not farther than the specified distance (blocking version). Read more
source§

fn radius_match_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, max_distance: f32, masks: &Vector<GpuMat>, compact_result: bool ) -> Result<()>

For each query descriptor, finds the training descriptors not farther than the specified distance (blocking version). Read more
source§

fn radius_match_def_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, max_distance: f32 ) -> Result<()>

@overload Read more
source§

fn radius_match_async( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, max_distance: f32, mask: &impl ToInputArray, stream: &mut impl StreamTrait ) -> Result<()>

For each query descriptor, finds the training descriptors not farther than the specified distance (asynchronous version). Read more
source§

fn radius_match_async_def( &mut self, query_descriptors: &impl ToInputArray, train_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, max_distance: f32 ) -> Result<()>

For each query descriptor, finds the training descriptors not farther than the specified distance (asynchronous version). Read more
source§

fn radius_match_async_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, max_distance: f32, masks: &Vector<GpuMat>, stream: &mut impl StreamTrait ) -> Result<()>

For each query descriptor, finds the training descriptors not farther than the specified distance (asynchronous version). Read more
source§

fn radius_match_async_def_1( &mut self, query_descriptors: &impl ToInputArray, matches: &mut impl ToOutputArray, max_distance: f32 ) -> Result<()>

@overload Read more
source§

fn radius_match_convert( &mut self, gpu_matches: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>>, compact_result: bool ) -> Result<()>

Converts matches array from internal representation to standard matches vector. Read more
source§

fn radius_match_convert_def( &mut self, gpu_matches: &impl ToInputArray, matches: &mut Vector<Vector<DMatch>> ) -> Result<()>

Converts matches array from internal representation to standard matches vector. Read more
source§

impl CUDA_DescriptorMatcherTraitConst for CUDA_DescriptorMatcher

source§

fn as_raw_CUDA_DescriptorMatcher(&self) -> *const c_void

source§

fn is_mask_supported(&self) -> Result<bool>

Returns true if the descriptor matcher supports masking permissible matches.
source§

fn get_train_descriptors(&self) -> Result<Vector<GpuMat>>

Returns a constant link to the train descriptor collection.
source§

fn empty(&self) -> Result<bool>

Returns true if there are no train descriptors in the collection.
source§

impl Debug for CUDA_DescriptorMatcher

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for CUDA_DescriptorMatcher

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<CUDA_DescriptorMatcher> for Algorithm

source§

fn from(s: CUDA_DescriptorMatcher) -> Self

Converts to this type from the input type.
source§

impl Send for CUDA_DescriptorMatcher

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Mat> ModifyInplace for Mat
where Mat: Boxed,

source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is of course unsafe as it breaks the Rust aliasing rules, but it might be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.