pub struct BFMatcher { /* private fields */ }
Expand description

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.

Implementations§

Brute-force matcher constructor (obsolete). Please use BFMatcher.create()

C++ default parameters
  • norm_type: NORM_L2
  • cross_check: false

Brute-force matcher create method.

Parameters
  • normType: One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor description).
  • crossCheck: If it is false, this is will be default BFMatcher behaviour when it finds the k nearest neighbors for each query descriptor. If crossCheck==true, then the knnMatch() method with k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the matcher’s collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent pairs. Such technique usually produces best results with minimal number of outliers when there are enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.
C++ default parameters
  • norm_type: NORM_L2
  • cross_check: false

Trait Implementations§

Clears the algorithm state
Reads algorithm parameters from a file storage
Stores algorithm parameters in a file storage
Stores algorithm parameters in a file storage Read more
@deprecated Read more
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
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.
C++ default parameters Read more
Wrap the specified raw pointer Read more
Return an the underlying raw pointer while consuming this wrapper. Read more
Return the underlying raw pointer. Read more
Return the underlying mutable raw pointer Read more
Adds descriptors to train a CPU(trainDescCollectionis) or GPU(utrainDescCollectionis) descriptor collection. Read more
Clears the train descriptor collections.
Trains a descriptor matcher Read more
Finds the best match for each descriptor from a query set. Read more
Finds the k best matches for each descriptor from a query set. Read more
For each query descriptor, finds the training descriptors not farther than the specified distance. Read more
Returns a constant link to the train descriptor collection trainDescCollection .
Returns true if there are no train descriptors in the both collections.
Returns true if the descriptor matcher supports masking permissible matches.
Finds the best match for each descriptor from a query set. Read more
Finds the k best matches for each descriptor from a query set. Read more
For each query descriptor, finds the training descriptors not farther than the specified distance. Read more
Clones the matcher. Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.