我正在尝试cvGoodFeatureToTrack
在 Visual Studio 2010 中使用图像类型为Mat
. 我见过的大多数示例都使用IplImage
指针。现在我有这个:
int w, h; // video frame size
Mat grayFrame;
Mat eigImage;
Mat tempImage;
const int MAX_CORNERS = 10;
CvPoint2D32f corners[MAX_CORNERS] = {0};
int corner_count = MAX_CORNERS;
double quality_level = 0.1;
double min_distance = 10;
int eig_block_size = 3;
int use_harris = false;
w = CurrFrame.size().width;
h = CurrFrame.size().height;
cvtColor(CurrFrame, grayFrame, CV_BGR2GRAY);
cvGoodFeaturesToTrack(&grayFrame,
&eigImage,
&tempImage,
corners,
&corner_count,
quality_level,
min_distance,
NULL,
eig_block_size,
use_harris);
它编译但给我一个内存访问冲突。帮助!