1、暴力匹配与FLANN的匹配时间比较
当ORB特征点为1000时,FLANN慢于暴力匹配,当ORB特征点>=1500时,FLANN时间少于暴力匹配。
特征点数目1000:(以下第一是FLANN,第二个是暴力)

特征点数目1300:

特征点数目1500:

特征点数目2000:

特征点数目3000:

2、cv::BFMatcher是cv的类名。
Brute-force matcher constructor.
cv::BFMatcher::BFMatcher ( int normType = NORM_L2,
bool crossCheck = false
)
Parameters
normType:One of NORM_L1, NORM_L2, NORM_HAMMING, NORM_HAMMING2. L1 and L2 norms are preferable choices for SIFT and SURF descriptors, NORM_HAMMING should be used with ORB, BRISK and BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K3 or 4 (see ORB::ORB constructor description).
crossCheck :If it is false, this is will be default BFMatcher behaviour when it finds the k nearest neighbors for each query descriptor. If crossChecktrue, then the knnMatch() method with k=1 will only return pairs (i,j) such that for i-th query descriptor the j-th descriptor in the matcher’s collection is the nearest and vice versa, i.e. the BFMatcher will only return consistent pairs. Such technique usually produces best results with minimal number of outliers when there are enough matches. This is alternative to the ratio test, used by D. Lowe in SIFT paper.
来自:https://docs.opencv.org/3.1.0/d3/da1/classcv_1_1BFMatcher.html#abe0bb11749b30d97f60d6ade665617bd
3、radiusMatch()
Mat descriptors1, descriptors2;
vector< vector< DMatch > > matches_radius;//不是vector< DMatch >
//省略计算特征点及描述子过程
BFMatcher matcher_bf(NORM_HAMMING, false);
matcher_bf.radiusMatch(descriptors1, descriptors2, matches_radius,100);
matches_radius的每一个 vector< DMatch >是某一个特征点的所有满足距离小于100的匹配点,匹配点按距离由小到大排列。
for(int j=0;j<matches_radius.size();j++){
if(matches_radius[j].size()!=0){
for(int i=0;i<matches_radius[j].size();i++){
cout<<matches_radius[j][i].distance<<",";
}
}
cout<<endl;cout<<endl;
}
输出:

本文对比了暴力匹配与FLANN在不同ORB特征点数量下的匹配效率,指出当特征点超过1500时,FLANN表现出更好的性能。同时,深入解析了cv::BFMatcher类的使用,包括其构造函数参数规范及其radiusMatch方法的应用,为读者提供特征匹配的实践指导。
4351

被折叠的 条评论
为什么被折叠?



