OpenCV中的SURF程序

OpenCV中的SURF程序,opencv,Opencv,我正在Ubuntu机器上使用OpenCV。 我无法使用SURF编译程序。代码如下: CvSURFParams params = cvSURFParams(500, 1); cvExtractSURF( image, 0, &imageKeypoints, &imageDescriptors, storage, params ); for( i = 0; i < imageKeypoints->total; i++ ) { CvSURFPoint* r = (C

我正在Ubuntu机器上使用OpenCV。 我无法使用SURF编译程序。代码如下:

CvSURFParams params = cvSURFParams(500, 1);
cvExtractSURF( image, 0, &imageKeypoints, &imageDescriptors, storage, params );
for( i = 0; i < imageKeypoints->total; i++ )
    {
CvSURFPoint* r = (CvSURFPoint*)cvGetSeqElem( imageKeypoints, i );
CvPoint center;
int radius;
center.x = cvRound(r->pt.x);
center.y = cvRound(r->pt.y);
radius = cvRound(r->size*1.2/9.*2);
cvCircle( frame, center, radius, red_color[0], 1, 8, 0 );
错误:“params”未在此作用域中声明 cvExtractSURF(图像、0和图像关键点、图像描述符、存储器、参数); 谢谢


Younès

请不要使用过时的C语法!如果您使用的是OpenCV 3,那么这些函数就不存在了!这个遗留代码很久以前就被删除了,不要再浪费时间了。对于opencv3,在哪里可以找到标题#include“opencv2/xfeatures2d.hpp”?我正在Ubuntu上工作。
 error: ‘CvSURFParams’ was not declared in this scope
CvSURFParams params = cvSURFParams(500, 1);
error: expected ‘;’ before ‘params’
 CvSURFParams params = cvSURFParams(500, 1);