- ORB特征提取
ORB是ORiented Brief的简称,是brief算法的改进版本。ORB是在2011年《ORB:an efficient alternative to SIFT or SURF》文章中被提出。我们首先认识Brief描述子。
Brief是Binary Robust Independent Elementary Features的缩写。这个特征是在ECCV2010上提出,主要思路就是在特征点附近随机选取若干点对,将这些点对的灰度值的大小,组合成一个二进制串,并将这个二进制串作为该特征点的特征描述子。
Brief的优点在于速度,而缺点也很多:
不具备旋转不变性和尺度不变性,对噪声敏感。
ORB算法就是为了解决旋转不变性和噪声敏感,对于尺度不变性没有更正。因为他的特征点是基于FAST的,而FAST本身就不具有尺度不变性,这种只求速度的特征描述子,一般都是用在实时的视频处理中,这样可以通过跟踪还有一些启发式的策略来解决尺度不变性的问题。
OpenCV中已经将其实现:
OrbFeatureDetector detect;
detect.detect();
OrbDescriptorExtractor extract;
extract.detect();
OrbFeatureDetector OrbFeatureDetector 是一个typedef的类型,等价
我们还需要重点研究下:FLANN
以下部分来自:
http://blog.csdn.net/jasonding1354/article/details/44038539
FLANN库全称是Fast Library for Approximate Nearest Neighbors,它是目前最完整的(近似)最近邻开源库。不但实现了一系列查找算法,还包含了一种自动选取最快算法的机制。
flann::Index_类
该类模板是最近邻索引类,该类用于抽象不同类型的最近邻搜索的索引。
以下是flann::Index_类的声明:
template <typename T>
class
#ifndef _MSC_VER
FLANN_DEPRECATED
#endif
Index_ {
public:
typedef typename L2<T>::ElementType ElementType;
typedef typename L2<T>::ResultType DistanceType;
Index_(const Mat& features, const ::cvflann::IndexParams& params);
~Index_();
void knnSearch(const vector<ElementType>& query, vector<int>& indices, vector<DistanceType>& dists, int knn, const ::cvflann::SearchParams& params);
void knnSearch(const Mat& queries, Mat& indices, Mat& dists, int knn, const ::cvflann::SearchParams& params);
int radiusSearch(const vector<ElementType>& query, vector<int>& indices, ve