1、DMatch类
class CV_EXPORTS_W_SIMPLE DMatch
{
public:
CV_WRAP DMatch();
CV_WRAP DMatch(int _queryIdx, int _trainIdx, float _distance);
CV_WRAP DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance);
CV_PROP_RW int queryIdx; //!< query descriptor index
CV_PROP_RW int trainIdx; //!< train descriptor index
CV_PROP_RW int imgIdx; //!< train image index
CV_PROP_RW float distance;
// less is better
bool operator<(const DMatch &m) const;
};
matches=bf.match(des1,des2);//des1是queryimage,des2是trainimage,matches是一个DMatch类
imgIdx,例如已知一幅图像的sift描述子,与其他十幅图像的描述子进行匹配,找最相似的图像,则imgIdx此时就有用了。
queryIdx是要求位姿的图像的特征点描述子的索引,trainIdx是参考静止的图像的特征点描述子的索引。
BF matcher takes the descriptor of on feature in first set and is matched with all other features in second set using some distance calculation. And the closet one is returned.
2、FLANN
FLANN是快速最近邻搜索包(Fast_Library_for_Approximate_Nearest_Neighbors)的简称,它是一个对大数据集和高维特征进行最近邻搜索的算法的集合,而且这些算法都已经被优化过了,在面对大数据集是它的效果要好于BFMatcher。
对于FLANN匹配算法,当使用ORB匹配算法的时候,需要重新构造HASH。
flann = cv.FlannBasedMatcher(index_params, search_params)
indexParams - 字典,包含各种算法,具体可参考FLANN文档。SearchParams - 字典,用来指定递归遍历的次数。值越高结果越准确,但是消耗的时间也越多,修改可以传入参数: search_params=dict( checks = 10)
index_params = dict(algorithm = 0, trees = 5)
search_params = dict(checks=20)
flann = cv.FlannBasedMatcher(index_params,search_params)
index_params = dict(algorithm = 0, trees = 5)
链接:https://zhuanlan.zhihu.com/p/74040063
来源:知乎
FLANN contains a collection of algorithms optimized.
For FLANN based matcher, we need to pass two dictionaries which specifies the algorithm to be used, ite related parameters etc. First one id IndexParams. Second is the SearchParams.
https://blog.csdn.net/u014403318/article/details/80568730?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.compare&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.compare
https://blog.csdn.net/qq_36387683/article/details/80578480
3、准确率和召回率
准确率:检测结果中有多少是对的。
召回率:实际是对的中间,有多少被检测出来。
重复率及论文:
https://blog.csdn.net/Jack_Sarah/article/details/79985947
设计的参数:内点比例/时间
A performance evaluation of local descriptors——局部描述子评估译文
https://blog.csdn.net/u010141025/article/details/17752831
4、Opencv匹配方法介绍
https://www.cnblogs.com/Jessica-jie/p/8622449.html
常用特征点、匹配评价代码(用单应矩阵)
https://www.cnblogs.com/jsxyhelu/p/7834416.html
单应矩阵判断内点(理论)(搜findHomography)
https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html?highlight=CV_RANSAC#findhomography
5、SIFT、SURF是基于浮点
ORB是二进制
6、kd树
https://www.cnblogs.com/eyeszjwang/articles/2429382.html
7、BFMatcher.knnMatch(). This matcher measures the distance between each pair of keypoint descriptors and returns for each keypoint its k best matches with the minimal distance.
8、OpenCV特征匹配教程
https://docs.opencv.org/trunk/dc/dc3/tutorial_py_matcher.html
检测与匹配的教程综合
https://docs.opencv.org/3.1.0/db/d27/tutorial_py_table_of_contents_feature2d.html