🤖
AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は
公式英語版(原文) を参照してください。
このセクションでは次のマッチング手法について説明する:
- GMS: Grid-based Motion Statistics, [28]
- LOGOS: 高外れ値空間検証のための局所幾何サポート, [181]
|
| void | cv::xfeatures2d::matchGMS (const Size &size1, const Size &size2, const std::vector< KeyPoint > &keypoints1, const std::vector< KeyPoint > &keypoints2, const std::vector< DMatch > &matches1to2, std::vector< DMatch > &matchesGMS, const bool withRotation=false, const bool withScale=false, const double thresholdFactor=6.0) |
| | [28] で説明されているGMS(Grid-based Motion Statistics)特徴マッチング手法。
|
| |
| void | cv::xfeatures2d::matchLOGOS (const std::vector< KeyPoint > &keypoints1, const std::vector< KeyPoint > &keypoints2, const std::vector< int > &nn1, const std::vector< int > &nn2, std::vector< DMatch > &matches1to2) |
| | [181] で説明されている LOGOS (Local geometric support for high-outlier spatial verification) 特徴マッチング戦略。
|
| |
◆ matchGMS()
| void cv::xfeatures2d::matchGMS |
( |
const Size & | size1, |
|
|
const Size & | size2, |
|
|
const std::vector< KeyPoint > & | keypoints1, |
|
|
const std::vector< KeyPoint > & | keypoints2, |
|
|
const std::vector< DMatch > & | matches1to2, |
|
|
std::vector< DMatch > & | matchesGMS, |
|
|
const bool | withRotation = false, |
|
|
const bool | withScale = false, |
|
|
const double | thresholdFactor = 6.0 ) |
| Python: |
|---|
| cv.xfeatures2d.matchGMS( | size1, size2, keypoints1, keypoints2, matches1to2[, withRotation[, withScale[, thresholdFactor]]] | ) -> | matchesGMS |
#include <opencv2/xfeatures2d.hpp>
[28] で説明されている GMS (Grid-based Motion Statistics) 特徴マッチング手法。
- 引数
-
| size1 | image1 の入力サイズ。 |
| size2 | image2 の入力サイズ。 |
| keypoints1 | image1 の入力キーポイント。 |
| keypoints2 | image2 の入力キーポイント。 |
| matches1to2 | 入力の1-最近傍マッチ。 |
| matchesGMS | GMS マッチング手法が返すマッチ。 |
| withRotation | 回転変換を考慮する。 |
| withScale | スケール変換を考慮する。 |
| thresholdFactor | 値が大きいほど、マッチ数は少なくなる。 |
- 覚え書き
- GMS は特徴の数が多いときによく機能するため、ORB 特徴を使用し、FastThreshold を0に設定して、できるだけ多くの特徴を素早く取得することを推奨する。マッチング結果が満足のいくものでない場合は、特徴をさらに追加するとよい。(640 X 480 の画像には10000を使用している。)画像に大きな回転やスケール変化がある場合は、withRotation または withScale を true に設定すること。
◆ matchLOGOS()
| void cv::xfeatures2d::matchLOGOS |
( |
const std::vector< KeyPoint > & | keypoints1, |
|
|
const std::vector< KeyPoint > & | keypoints2, |
|
|
const std::vector< int > & | nn1, |
|
|
const std::vector< int > & | nn2, |
|
|
std::vector< DMatch > & | matches1to2 ) |
| Python: |
|---|
| cv.xfeatures2d.matchLOGOS( | keypoints1, keypoints2, nn1, nn2 | ) -> | matches1to2 |
#include <opencv2/xfeatures2d.hpp>
[181] で説明されているLOGOS(高外れ値空間検証のための局所幾何サポート)特徴マッチング戦略。
- 引数
-
| keypoints1 | image1 の入力キーポイント。 |
| keypoints2 | image2 の入力キーポイント。 |
| nn1 | image1 の各記述子に対する最も近い BoW セントロイドへのインデックス。 |
| nn2 | image2 の各記述子に対する最も近い BoW セントロイドへのインデックス。 |
| matches1to2 | LOGOS マッチング手法が返すマッチ。 |
- 覚え書き
- このマッチング手法は、大規模なデータベースに対する特徴マッチングに適している。最初のステップは、代表的な画像データベースから bag-of-words (BoW) を構築することである。次に、画像記述子は最も近いコードベクトル(最近傍 BoW セントロイド)で表現される。