| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cv::detail::FeaturesMatcher Class Referenceabstract
Images stitching » Features Finding and Images Matching

Feature matchers base class. More...

`#include <opencv2/stitching/detail/matchers.hpp>`

Collaboration diagram for cv::detail::FeaturesMatcher:

## Public Member Functions
virtual | ~FeaturesMatcher ()
virtual void | collectGarbage ()
| Frees unused memory allocated before if there is any.
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.

## Protected Member Functions
| FeaturesMatcher (bool is_thread_safe=false)
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.
virtual void | match (const std::vector< ImageFeatures > &features, std::vector< MatchesInfo > &pairwise_matches, const cv::UMat &mask=cv::UMat())
| This method implements logic to match features between arbitrary number of features. By default this checks every pair of inputs in the input, but the behaviour can be changed by subclasses.

## Protected Attributes
bool | is_thread_safe_

## Detailed Description

Feature matchers base class.

## Constructor & Destructor Documentation

## ◆ ~FeaturesMatcher()

virtual cv::detail::FeaturesMatcher::~FeaturesMatcher | ( |  | ) |
| inline virtual

## ◆ FeaturesMatcher()

cv::detail::FeaturesMatcher::FeaturesMatcher | ( | bool | is_thread_safe = false | ) |
| inline protected

## Member Function Documentation

## ◆ collectGarbage()

virtual void cv::detail::FeaturesMatcher::collectGarbage | ( |  | ) |
| inline virtual

Python:
| cv.detail.FeaturesMatcher.collectGarbage( |  | ) -> | None

Frees unused memory allocated before if there is any.

Reimplemented in cv::detail::BestOf2NearestMatcher.

## ◆ isThreadSafe()

bool cv::detail::FeaturesMatcher::isThreadSafe | ( |  | ) | const
| inline

Python:
| cv.detail.FeaturesMatcher.isThreadSafe( |  | ) -> | retval

Returns
  True, if it's possible to use the same matcher instance in parallel, false otherwise

## ◆ match() [1/2]

virtual void cv::detail::FeaturesMatcher::match | ( | const ImageFeatures & | features1,
|  | const ImageFeatures & | features2,
|  | MatchesInfo & | matches_info )
| protected pure virtual

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

Implemented in cv::detail::AffineBestOf2NearestMatcher, cv::detail::BestOf2NearestMatcher, and cv::detail::BestOf2NearestRangeMatcher.

## ◆ match() [2/2]

virtual void cv::detail::FeaturesMatcher::match | ( | const std::vector< ImageFeatures > & | features,
|  | std::vector< MatchesInfo > & | pairwise_matches,
|  | const cv::UMat & | mask = cv::UMat() )
| protected virtual

This method implements logic to match features between arbitrary number of features. By default this checks every pair of inputs in the input, but the behaviour can be changed by subclasses.

Parameters

  features | vector of image features
  pairwise_matches | found matches
  mask | (optional) mask indicating which image pairs should be matched

Reimplemented in cv::detail::BestOf2NearestRangeMatcher.

## ◆ operator()() [1/2]

void cv::detail::FeaturesMatcher::operator() | ( | const ImageFeatures & | features1,
|  | const ImageFeatures & | features2,
|  | MatchesInfo & | matches_info )
| inline

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

## ◆ operator()() [2/2]

void cv::detail::FeaturesMatcher::operator() | ( | const std::vector< ImageFeatures > & | features,
|  | std::vector< MatchesInfo > & | pairwise_matches,
|  | const cv::UMat & | mask = cv::UMat() )
| inline

Performs images matching.

Parameters

  features | Features of the source images
  pairwise_matches | Found pairwise matches
  mask | Mask indicating which image pairs must be matched

The function is parallelized with the TBB library.

See also
  detail::MatchesInfo

## Member Data Documentation

## ◆ is_thread_safe_

bool cv::detail::FeaturesMatcher::is_thread_safe_
| protected

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

- opencv2/stitching/detail/matchers.hpp