源代码:
IplImage* image_src, TempImg; //定义两个IplImage*变量
IplImage *image = cvLoadImage(“test.jpg”); //加载一幅图片
int width = image->width;
int height = image->height;
image_src = cvCloneImage(image);
cvSetImageROI(image_src, cvRect( 0, 0, width, height));
TempImg = cvCreateImage(cvSize(width, height), image->depth, image->nChannels);
cvCopy(image_src, TempImg);
在编译的过程中,出现以下错误:
错误: ‘operator=’在‘TempImg = cvCreateImage(cvSize(width, height), image->_IplImage::depth, image->_IplImage::nChannels)’中没有匹配
附注: 备选是:
In file included from /usr/local/include/opencv2/core/core_c.h:47:0,
from /usr/local/include/opencv/highgui.h:45,
from ../src/API_annotaDeal/API_annotaDeal.cpp:22:
/usr/local/include/opencv2/core/types_c.h:465: