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_
保護

該類的文件是從以下檔案生成的