学习opencv的时候,发现调用摄像头采集时,如
VideoCapture camera(0);
Mat frame;
camera>>frame;
是可以的,但是
IplImage *Image;
不可以有“camera>>Image”
这就有点麻烦了,因为有的函数参数是IplImage类型的,所以就查了下资料
1、将Mat转换为IplImage
operator IplImage() const;
举例:Mat img;
IplImage *src;
src=&IplImage(img);
2、将IplImage转换为Mat
Mat(const IplImage* img, bool copyData=false);