OpenCV错误:断言失败(cvsnakeimage)

时间:2012-05-21 12:58:18

标签: c++ opencv

CvPoint _pointsArray[5];
float _g_alpha;
float _g_beta;
float _g_gamma;
_g_alpha = 0.78f;
_g_beta = 0.28f;
_g_gamma = 0.32f;
_criteria.type = CV_TERMCRIT_ITER;
_pointsArray[0].x =1;
_pointsArray[0].y =1;
_pointsArray[1].x =1;
_pointsArray[1].y =1;
_pointsArray[2].x =1;
_pointsArray[2].y =1;
_pointsArray[3].x =1;
_pointsArray[3].y =1;
_pointsArray[4].x =1;
_pointsArray[4].y =1;
IplImage* temp;
temp = _inImage->getIplImage();
cvSnakeImage(temp,_pointsArray,5,&_g_alpha,&_g_beta,&_g_gamma,CV_VALUE,win,_criteria,false);

上面的代码总是给我这个错误

OpenCV Error: Assertion failed ((icvSnake8uC1R( data, step, size, points, length, alpha, beta, gamma, coeffUsage, win, criteria, calcGradient ? 2 : 1 )) >= 0) in unknown function, file .\src\snakes.cpp, line 425

任何人都知道这是什么原因?????

感谢。

解决了谢谢。问题是胜利的大小不是奇怪的大小!

0 个答案:

没有答案