我对Mat
构造函数有疑问
在win7x32下运行,编译openCV 2.2.0(不管在这里?!)
例如,我有下一个主要代码,问题是:
int main(int argc, char *argv[]){
const char* filename = "test.bmp";
IplImage* img = cvLoadImage(filename, 1); // works OK
cvShowImage("hello openCV", img); // works OK
Mat image(img); // asserting HERE !
//... the next is out of problem
...
return 0;
}
这是console \ terminal输出:
OpenCV Error: Assertion failed ((((img) != __null && ((const IplImage*)(img))->nSize == sizeof(IplImage)) && ((IplImage*)img)->imageData != __null) && img->imageData != 0) in Mat, file D:\OpenCV-2.2.0\opencv\modules\core\src\matrix.cpp, line 427