Class cv::detail::AffineBestOf2NearestMatcher#

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. View details

Collaboration diagram for cv::detail::AffineBestOf2NearestMatcher:

Public Member Functions#

Public Member Functions inherited from cv::detail::BestOf2NearestMatcher
Public Member Functions inherited from cv::detail::FeaturesMatcher

Static Public Member Functions#

Static Public Member Functions inherited from cv::detail::BestOf2NearestMatcher

Additional Inherited Members#

Protected Member Functions inherited from cv::detail::BestOf2NearestMatcher

Return

Name

Description

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.

Protected Member Functions inherited from cv::detail::FeaturesMatcher

Return

Name

Description

FeaturesMatcher(bool is_thread_safe = false)

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.

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 inherited from cv::detail::BestOf2NearestMatcher

Return

Name

Description

Ptr< FeaturesMatcher >

impl_

double

matches_confidence_thresh_

int

num_matches_thresh1_

int

num_matches_thresh2_

Protected Attributes inherited from cv::detail::FeaturesMatcher

Return

Name

Description

bool

is_thread_safe_

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 transformation estimate will be placed in matches_info).

See also

cv::detail::FeaturesMatcher cv::detail::BestOf2NearestMatcher

Examples
samples/cpp/stitching_detailed.cpp.

Constructor & Destructor Documentation#

AffineBestOf2NearestMatcher()#

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

Python:

cv.detail.AffineBestOf2NearestMatcher([, full_affine[, try_use_gpu[, match_conf[, num_matches_thresh1]]]]) -> <detail_AffineBestOf2NearestMatcher object>

Constructs a “best of 2 nearest” matcher that expects affine transformation 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

Member Function Documentation#

match()#

void cv::detail::AffineBestOf2NearestMatcher::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.

Parameters

  • features1 — first image features

  • features2 — second image features

  • matches_info — found matches

Member Data Documentation#

full_affine_#

bool cv::detail::AffineBestOf2NearestMatcher::full_affine_

Source file#

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