OpenCV453
関数
Xfeatures2d_match

関数

CV_EXPORTS_W 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, CV_OUT std::vector< DMatch > &matchesGMS, const bool withRotation=false, const bool withScale=false, const double thresholdFactor=6.0)
 GMS (Grid-based Motion Statistics) feature matching strategy described in [Bian2017gms] . [詳解]
 
CV_EXPORTS_W 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)
 LOGOS (Local geometric support for high-outlier spatial verification) feature matching strategy described in [Lowry2018LOGOSLG] . [詳解]
 

詳解

関数詳解

◆ matchGMS()

CV_EXPORTS_W 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,
CV_OUT std::vector< DMatch > &  matchesGMS,
const bool  withRotation = false,
const bool  withScale = false,
const double  thresholdFactor = 6.0 
)

GMS (Grid-based Motion Statistics) feature matching strategy described in [Bian2017gms] .

引数
size1Input size of image1.
size2Input size of image2.
keypoints1Input keypoints of image1.
keypoints2Input keypoints of image2.
matches1to2Input 1-nearest neighbor matches.
matchesGMSMatches returned by the GMS matching strategy.
withRotationTake rotation transformation into account.
withScaleTake scale transformation into account.
thresholdFactorThe higher, the less matches.
覚え書き
Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly. If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480). If your images have big rotation and scale changes, please set withRotation or withScale to true.

◆ matchLOGOS()

CV_EXPORTS_W 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 
)

LOGOS (Local geometric support for high-outlier spatial verification) feature matching strategy described in [Lowry2018LOGOSLG] .

引数
keypoints1Input keypoints of image1.
keypoints2Input keypoints of image2.
nn1Index to the closest BoW centroid for each descriptors of image1.
nn2Index to the closest BoW centroid for each descriptors of image2.
matches1to2Matches returned by the LOGOS matching strategy.
覚え書き
This matching strategy is suitable for features matching against large scale database. First step consists in constructing the bag-of-words (BoW) from a representative image database. Image descriptors are then represented by their closest codevector (nearest BoW centroid).