Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: RZ_A2M_Mbed_samples
AffineBestOf2NearestMatcher Class Reference
[Features Finding and Images Matching]
Features matcher similar to cv::detail::BestOf2NearestMatcher 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>
Inherits cv::detail::BestOf2NearestMatcher.
Public Member Functions | |
AffineBestOf2NearestMatcher (bool full_affine=false, bool try_use_gpu=false, float match_conf=0.3f, int num_matches_thresh1=6) | |
Constructs a "best of 2 nearest" matcher that expects affine trasformation between images. | |
void | collectGarbage () |
Frees unused memory allocated before if there is any. | |
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. | |
void | operator() (const std::vector< ImageFeatures > &features, std::vector< MatchesInfo > &pairwise_matches, const cv::UMat &mask=cv::UMat()) |
Performs images matching. | |
bool | isThreadSafe () const |
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. |
Detailed Description
Features matcher similar to cv::detail::BestOf2NearestMatcher 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.
Unlike cv::detail::BestOf2NearestMatcher this matcher uses affine transformation (affine trasformation estimate will be placed in matches_info).
Definition at line 324 of file matchers.hpp.
Constructor & Destructor Documentation
AffineBestOf2NearestMatcher | ( | bool | full_affine = false , |
bool | try_use_gpu = false , |
||
float | match_conf = 0.3f , |
||
int | num_matches_thresh1 = 6 |
||
) |
Constructs a "best of 2 nearest" matcher that expects affine trasformation between images.
- Parameters:
-
full_affine whether to use full affine transformation with 6 degress of freedom or reduced transformation with 4 degrees of freedom using only rotation, translation and uniform scaling try_use_gpu Should try to use GPU or not match_conf Match distances ration threshold num_matches_thresh1 Minimum number of matches required for the 2D affine transform estimation used in the inliers classification step
- See also:
- cv::estimateAffine2D cv::estimateAffinePartial2D
Definition at line 339 of file matchers.hpp.
Member Function Documentation
void collectGarbage | ( | ) | [virtual, inherited] |
Frees unused memory allocated before if there is any.
Reimplemented from FeaturesMatcher.
bool isThreadSafe | ( | ) | const [inherited] |
- Returns:
- True, if it's possible to use the same matcher instance in parallel, false otherwise
Definition at line 249 of file matchers.hpp.
void match | ( | const ImageFeatures & | features1, |
const ImageFeatures & | features2, | ||
MatchesInfo & | matches_info | ||
) | [protected, 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
Reimplemented from BestOf2NearestMatcher.
void operator() | ( | const ImageFeatures & | features1, |
const ImageFeatures & | features2, | ||
MatchesInfo & | matches_info | ||
) | [inherited] |
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
Definition at line 231 of file matchers.hpp.
void operator() | ( | const std::vector< ImageFeatures > & | features, |
std::vector< MatchesInfo > & | pairwise_matches, | ||
const cv::UMat & | mask = cv::UMat() |
||
) | [inherited] |
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
Generated on Tue Jul 12 2022 18:20:24 by
