OpenCV  3.2.0
Open Source Computer Vision
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cv::detail::BestOf2NearestMatcher Class Reference

Features matcher which finds two best matches for each feature and leaves the best one only if the ratio between descriptor distances is greater than the threshold match_conf. More...

#include "matchers.hpp"

Inheritance diagram for cv::detail::BestOf2NearestMatcher:
cv::detail::FeaturesMatcher cv::detail::AffineBestOf2NearestMatcher cv::detail::BestOf2NearestRangeMatcher

Public Member Functions

 BestOf2NearestMatcher (bool try_use_gpu=false, float match_conf=0.3f, int num_matches_thresh1=6, int num_matches_thresh2=6)
 Constructs a "best of 2 nearest" matcher. More...
 
void collectGarbage ()
 Frees unused memory allocated before if there is any. More...
 
- Public Member Functions inherited from cv::detail::FeaturesMatcher
virtual ~FeaturesMatcher ()
 
bool isThreadSafe () const
 
void operator() (const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info)
 
void operator() (const std::vector< ImageFeatures > &features, std::vector< MatchesInfo > &pairwise_matches, const cv::UMat &mask=cv::UMat())
 Performs images matching. More...
 

Protected Member Functions

void match (const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info)
 This method must implement matching logic in order to make the wrappers detail::FeaturesMatcher::operator()_ work. More...
 
- Protected Member Functions inherited from cv::detail::FeaturesMatcher
 FeaturesMatcher (bool is_thread_safe=false)
 

Protected Attributes

Ptr< FeaturesMatcherimpl_
 
int num_matches_thresh1_
 
int num_matches_thresh2_
 
- Protected Attributes inherited from cv::detail::FeaturesMatcher
bool is_thread_safe_
 

Detailed Description

Features matcher which finds two best matches for each feature and leaves the best one only if the ratio between descriptor distances is greater than the threshold match_conf.

See also
detail::FeaturesMatcher

Constructor & Destructor Documentation

§ BestOf2NearestMatcher()

cv::detail::BestOf2NearestMatcher::BestOf2NearestMatcher ( bool  try_use_gpu = false,
float  match_conf = 0.3f,
int  num_matches_thresh1 = 6,
int  num_matches_thresh2 = 6 
)

Constructs a "best of 2 nearest" matcher.

Parameters
try_use_gpuShould try to use GPU or not
match_confMatch distances ration threshold
num_matches_thresh1Minimum number of matches required for the 2D projective transform estimation used in the inliers classification step
num_matches_thresh2Minimum number of matches required for the 2D projective transform re-estimation on inliers

Member Function Documentation

§ collectGarbage()

void cv::detail::BestOf2NearestMatcher::collectGarbage ( )
virtual

Frees unused memory allocated before if there is any.

Reimplemented from cv::detail::FeaturesMatcher.

§ match()

void cv::detail::BestOf2NearestMatcher::match ( const ImageFeatures features1,
const ImageFeatures features2,
MatchesInfo matches_info 
)
protectedvirtual

This method must implement matching logic in order to make the wrappers detail::FeaturesMatcher::operator()_ work.

Parameters
features1first image features
features2second image features
matches_infofound matches

Implements cv::detail::FeaturesMatcher.

Reimplemented in cv::detail::AffineBestOf2NearestMatcher.

Member Data Documentation

§ impl_

Ptr<FeaturesMatcher> cv::detail::BestOf2NearestMatcher::impl_
protected

§ num_matches_thresh1_

int cv::detail::BestOf2NearestMatcher::num_matches_thresh1_
protected

§ num_matches_thresh2_

int cv::detail::BestOf2NearestMatcher::num_matches_thresh2_
protected

The documentation for this class was generated from the following file: