BruteForceMatcher和FlannBasedMatcher函数
来源:互联网 发布:c语言分布式服务框架 编辑:程序博客网 时间:2024/06/07 20:30
本文转自:http://blog.csdn.net/holybin/article/details/44778747
Brute Force匹配和FLANN匹配是opencv二维特征点匹配常见的两种办法,分别对应BFMatcher(BruteForceMatcher)和FlannBasedMatcher。BFMatcher的构造函数如下:
- 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_K==3 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 crossCheck==true, 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.
class FlannBasedMatcher : public DescriptorMatcher{public: FlannBasedMatcher( const Ptr<flann::IndexParams>& indexParams=new flann::KDTreeIndexParams(), const Ptr<flann::SearchParams>& searchParams=new flann::SearchParams() ); virtual void add( const vector<Mat>& descriptors ); virtual void clear(); virtual void train(); virtual bool isMaskSupported() const; virtual Ptr<DescriptorMatcher> clone( bool emptyTrainData=false ) const;protected: ...};
二者的区别在于BFMatcher总是尝试所有可能的匹配,从而使得它总能够找到最佳匹配,这也是Brute Force(暴力法)的原始含义。而FlannBasedMatcher中FLANN的含义是Fast Library forApproximate Nearest Neighbors,从字面意思可知它是一种近似法,算法更快但是找到的是最近邻近似匹配,所以当我们需要找到一个相对好的匹配但是不需要最佳匹配的时候往往使用FlannBasedMatcher。当然也可以通过调整FlannBasedMatcher的参数来提高匹配的精度或者提高算法速度,但是相应地算法速度或者算法精度会受到影响。
SiftDescriptorExtractor,有的是uchar类型的,比如说有ORB,BriefDescriptorExtractor。对应float类型的匹配方式有:FlannBasedMatcher,BruteForce<L2<float>>,BruteForce<SL2<float>>,BruteForce<L1<float>>。对应uchar类型的匹配方式有:BruteForce<Hammin>,BruteForce<HammingLUT>。所以ORB和BRIEF特征描述子只能使用BruteForce匹配法。
0 0
- BruteForceMatcher和FlannBasedMatcher函数
- OPENCV中BFMatcher(BruteForceMatcher)和FlannBasedMatcher区别
- BFMatcher和FlannBasedMatcher
- opencv中的BFMatcher和FlannBasedMatcher的区别
- OpenCV中feature2D学习——BFMatcher和FlannBasedMatcher
- SURF特征点检测--SurfFeatureDetector、SurfDescriptorExtractor和FlannBasedMatcher
- SURF特征点检测--SurfFeatureDetector、SurfDescriptorExtractor和FlannBasedMatcher
- OpenCV中feature2D学习——ORB和BruteForceMatcher
- OpenCV中feature2D学习——ORB和BruteForceMatcher
- OpenCV中feature2D学习——ORB和BruteForceMatcher
- BruteForceMatcher无法找到
- OpenCV使用之-----BruteForceMatcher无法使用
- OpenCV - undefined reference: SurfFeatureDetector and BruteForceMatcher
- BruteForceMatcher报错“无法识别的标识符”
- opencv3.2中SurfFeatureDetector、SurfDescriptorExtractor、BruteForceMatcher用法
- OpenCV使用之-----BruteForceMatcher报错“无法识别的标识符”
- VS2012提示cv中没有成员SurfFeatureDetector/SiftFeatureDetector/BruteForceMatcher
- Freak特征描述+BruteForceMatcher匹配+RANSAC剔除误匹配
- BootStrap3.0学习--组件
- BootStrap3.0学习--JavaScript 插件
- maven 仓库地址收藏
- [LeetCode]*106.Construct Binary Tree from Inorder and Postorder Traversal
- JavaScript浏览器对象之History对象 Navigator对象 Location对象 Screen对象
- BruteForceMatcher和FlannBasedMatcher函数
- 利用大数据帮助医疗机构的5种方法
- LeetCode_Regular Expression Matching
- win+linux双系统下卸载linux
- 如何看CentOS系统是32位还是64位的?
- linux下安装html的编辑器
- Bootstrap-打造自己的轮播器
- 图像处理(六)递归双边滤波磨皮
- BruteForceMatcher报错“无法识别的标识符”