class cv::detail::FeaturesMatcher
Overview
Feature matchers base class. More…
#include <matchers.hpp> class FeaturesMatcher { public: // methods virtual void collectGarbage(); 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() ); protected: // fields bool is_thread_safe_; // construction FeaturesMatcher(bool is_thread_safe = false); // methods virtual void match( const ImageFeatures& features1, const ImageFeatures& features2, MatchesInfo& matches_info ) = 0; }; // direct descendants class BestOf2NearestMatcher;
Detailed Documentation
Feature matchers base class.
Methods
virtual void collectGarbage()
Frees unused memory allocated before if there is any.
bool isThreadSafe() const
Returns:
True, if it’s possible to use the same matcher instance in parallel, false otherwise
void operator()( const ImageFeatures& features1, const ImageFeatures& features2, MatchesInfo& matches_info )
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parameters:
features1 | First image features |
features2 | Second image features |
matches_info | Found matches |
void operator()( const std::vector<ImageFeatures>& features, std::vector<MatchesInfo>& pairwise_matches, const cv::UMat& mask = cv::UMat() )
Performs images matching.
The function is parallelized with the TBB library.
Parameters:
features | Features of the source images |
pairwise_matches | Found pairwise matches |
mask | Mask indicating which image pairs must be matched |
See also:
virtual void match( const ImageFeatures& features1, const ImageFeatures& features2, MatchesInfo& matches_info ) = 0
This method must implement matching logic in order to make the wrappers detail::FeaturesMatcher::operator()_ work.
Parameters:
features1 | first image features |
features2 | second image features |
matches_info | found matches |