OpenCV入门 - 关键点描述子匹配Flann-based
和前面利用暴力法找距离最近的descriptor,Flann-based matcher使用快速近似最近邻搜索算法,在匹配前可以利用图片训练该matcher,从而加快检测速度(TODO).
What is it Flann? FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. It contains a collection of algorithms we found to work best for nearest neighbor search and a system for automatically choosing the best algorithm and optimum parameters depending on the dataset.
和前面利用暴力法找距离最近的descriptor,Flann-based matcher使用快速近似最近邻搜索算法,在匹配前可以利用图片训练该matcher,从而加快检测速度(TODO).
What is it Flann? FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. It contains a collection of algorithms we found to work best for nearest neighbor search and a system for automatically choosing the best algorithm and optimum parameters depending on the dataset.
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/nonfree/features2d.hpp> //
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, const char *argv[]){
Mat car1 = imread("car1.jpeg", 0);// load as grayscale
Mat car2 = imread("car2.jpeg", 0);
//cv::resi