//surf.cpp
#include "stdafx.h"
#include <cv.hpp>
#include <highgui.h>
#include "utils.h"
#include <iostream>
using namespace std;
void surf(char* path1, char* path2, INFO& info, bool show)
{
double t1,t2;
t1=cvGetTickCount();
initModule_nonfree();
Mat img1, img2;
img1=imread(path1,0);
img2=imread(path2,0);
if(img1.data==NULL)
{
cout<<"The image can not been loaded: "<<path1<<endl;
system("pause");
exit(-1);
}
if(img2.data==NULL)
{
cout<<"The image can not been loaded: "<<path2<<endl;
system("pause");
exit(-1);
}
int minHessian=200;
SurfFeatureDetector surf_detector(minHessian) ;
SurfDescriptorExtractor surf_descriptor ;
vector<KeyPoint>
OpenCV图像匹配算法之surf
最新推荐文章于 2024-07-28 08:47:53 发布
本文深入探讨了OpenCV库中的SURF(Speeded Up Robust Features)算法,详细阐述了如何利用该算法进行图像特征匹配,并提供了相关的实用代码示例,包括utils.h和utils.cpp文件的内容解析。
摘要由CSDN通过智能技术生成