OpenCV 5.0.0
Open Source Computer Vision
Loading...
Searching...
No Matches
cv::detail::LightGlueFeaturesMatcher Class Reference

Features matcher that adapts LightGlueMatcher (DescriptorMatcher) to the stitching pipeline's FeaturesMatcher interface. More...

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

Public Member Functions

 LightGlueFeaturesMatcher (Ptr< LightGlueMatcher > lgMatcher, int num_matches_thresh1=6, int num_matches_thresh2=6, double matches_confidence_thresh=3.0)
 Constructs a LightGlue features matcher.
void setScoreThreshold (float thresh)
 Sets the LightGlue confidence threshold for filtering matches.
Public Member Functions inherited from cv::detail::FeaturesMatcher
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

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

float lg_score_thresh_
Ptr< LightGlueMatcherlgMatcher_
double matches_confidence_thresh_
int num_matches_thresh1_
int num_matches_thresh2_
Protected Attributes inherited from cv::detail::FeaturesMatcher
bool is_thread_safe_

Detailed Description

Features matcher that adapts LightGlueMatcher (DescriptorMatcher) to the stitching pipeline's FeaturesMatcher interface.

This matcher uses DNN-based LightGlue for feature matching, requiring ALIKED-style keypoints with spatial context for positional encoding.

See also
cv::detail::FeaturesMatcher cv::LightGlueMatcher

Constructor & Destructor Documentation

◆ LightGlueFeaturesMatcher()

cv::detail::LightGlueFeaturesMatcher::LightGlueFeaturesMatcher ( Ptr< LightGlueMatcher > lgMatcher,
int num_matches_thresh1 = 6,
int num_matches_thresh2 = 6,
double matches_confidence_thresh = 3.0 )
Python:
cv.detail.LightGlueFeaturesMatcher(lgMatcher[, num_matches_thresh1[, num_matches_thresh2[, matches_confidence_thresh]]]) -> <detail_LightGlueFeaturesMatcher object>

Constructs a LightGlue features matcher.

Parameters
lgMatcherLightGlueMatcher instance for DNN-based matching
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
matches_confidence_threshMatching confidence threshold to take the match into account.

Member Function Documentation

◆ match()

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

◆ setScoreThreshold()

void cv::detail::LightGlueFeaturesMatcher::setScoreThreshold ( float thresh)
Python:
cv.detail.LightGlueFeaturesMatcher.setScoreThreshold(thresh) -> None

Sets the LightGlue confidence threshold for filtering matches.

Member Data Documentation

◆ lg_score_thresh_

float cv::detail::LightGlueFeaturesMatcher::lg_score_thresh_
protected

◆ lgMatcher_

Ptr<LightGlueMatcher> cv::detail::LightGlueFeaturesMatcher::lgMatcher_
protected

◆ matches_confidence_thresh_

double cv::detail::LightGlueFeaturesMatcher::matches_confidence_thresh_
protected

◆ num_matches_thresh1_

int cv::detail::LightGlueFeaturesMatcher::num_matches_thresh1_
protected

◆ num_matches_thresh2_

int cv::detail::LightGlueFeaturesMatcher::num_matches_thresh2_
protected

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