OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项
cv::detail::BestOf2NearestMatcher 类参考

特征匹配器,为每个特征找到两个最佳匹配项,并且仅当描述符距离之间的比率大于阈值 match_conf 时才保留最佳匹配项。 更多...

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

cv::detail::BestOf2NearestMatcher 的协作图

公共成员函数

 BestOf2NearestMatcher (bool try_use_gpu=false, float match_conf=0.3f, int num_matches_thresh1=6, int num_matches_thresh2=6, double matches_confindece_thresh=3.)
 构造一个“best of 2 nearest”匹配器。
 
void collectGarbage () CV_OVERRIDE
 释放之前分配的任何未使用的内存。
 
- 继承自 cv::detail::FeaturesMatcher 的公共成员函数
virtual ~FeaturesMatcher ()
 
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())
 执行图像匹配。
 

静态公共成员函数

static Ptr< BestOf2NearestMatchercreate (bool try_use_gpu=false, float match_conf=0.3f, int num_matches_thresh1=6, int num_matches_thresh2=6, double matches_confindece_thresh=3.)
 

保护成员函数

void match (const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info) CV_OVERRIDE
 此方法必须实现匹配逻辑,以便 detail::FeaturesMatcher::operator()_ 包装器才能工作。
 
- 继承自 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())
 此方法实现了在任意数量的特征之间匹配特征的逻辑。 默认情况下,这会检查输入中的每对输入,但子类可以更改该行为。
 

保护属性

Ptr< FeaturesMatcherimpl_
 
double matches_confindece_thresh_
 
int num_matches_thresh1_
 
int num_matches_thresh2_
 
- 继承自 cv::detail::FeaturesMatcher 的保护属性
bool is_thread_safe_
 

详细描述

特征匹配器,为每个特征找到两个最佳匹配项,并且仅当描述符距离之间的比率大于阈值 match_conf 时才保留最佳匹配项。

另请参见
detail::FeaturesMatcher

构造函数 & 析构函数文档

◆ BestOf2NearestMatcher()

cv::detail::BestOf2NearestMatcher::BestOf2NearestMatcher ( bool try_use_gpu = false,
float match_conf = 0.3f,
int num_matches_thresh1 = 6,
int num_matches_thresh2 = 6,
double matches_confindece_thresh = 3. )
Python
cv.detail.BestOf2NearestMatcher([, try_use_gpu[, match_conf[, num_matches_thresh1[, num_matches_thresh2[, matches_confindece_thresh]]]]]) -> <detail_BestOf2NearestMatcher object>

构造一个“best of 2 nearest”匹配器。

参数
try_use_gpu应尝试使用 GPU 还是不使用 GPU
match_conf匹配距离比率阈值
num_matches_thresh1在内点分类步骤中使用的 2D 投影变换估计所需的最小匹配数
num_matches_thresh2内点上的 2D 投影变换重新估计所需的最小匹配数
matches_confindece_thresh将匹配考虑在内的匹配置信度阈值。 该阈值是通过实验确定的,默认设置为 3。

成员函数文档

◆ collectGarbage()

void cv::detail::BestOf2NearestMatcher::collectGarbage ( )
virtual
Python
cv.detail.BestOf2NearestMatcher.collectGarbage() ->

释放之前分配的任何未使用的内存。

cv::detail::FeaturesMatcher 重新实现。

◆ create()

static Ptr< BestOf2NearestMatcher > cv::detail::BestOf2NearestMatcher::create ( bool try_use_gpu = false,
float match_conf = 0.3f,
int num_matches_thresh1 = 6,
int num_matches_thresh2 = 6,
double matches_confindece_thresh = 3. )
static
Python
cv.detail.BestOf2NearestMatcher.create([, try_use_gpu[, match_conf[, num_matches_thresh1[, num_matches_thresh2[, matches_confindece_thresh]]]]]) -> retval
cv.detail.BestOf2NearestMatcher_create([, try_use_gpu[, match_conf[, num_matches_thresh1[, num_matches_thresh2[, matches_confindece_thresh]]]]]) -> retval

◆ match()

void cv::detail::BestOf2NearestMatcher::match ( const ImageFeatures & features1,
const ImageFeatures & features2,
MatchesInfo & matches_info )
protectedvirtual

此方法必须实现匹配逻辑,以便 detail::FeaturesMatcher::operator()_ 包装器才能工作。

参数
features1第一张图像的特征
features2第二张图像的特征
matches_info找到的匹配

实现 cv::detail::FeaturesMatcher

cv::detail::BestOf2NearestRangeMatcher 中重新实现。

成员数据文档

◆ impl_

Ptr<FeaturesMatcher> cv::detail::BestOf2NearestMatcher::impl_
保护

◆ matches_confindece_thresh_

double cv::detail::BestOf2NearestMatcher::matches_confindece_thresh_
保护

◆ num_matches_thresh1_

int cv::detail::BestOf2NearestMatcher::num_matches_thresh1_
保护

◆ num_matches_thresh2_

int cv::detail::BestOf2NearestMatcher::num_matches_thresh2_
保护

该类的文档是从以下文件生成的