Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试使用OpenCv中Mat对象转换的IplImage对象时出错_Opencv - Fatal编程技术网

尝试使用OpenCv中Mat对象转换的IplImage对象时出错

尝试使用OpenCv中Mat对象转换的IplImage对象时出错,opencv,Opencv,IplImage*IplImg Mat ImgMat(IplImg) imshow(“Mat”,ImgMat) 在OpenCV中,如上所述,我可以将IplImage对象转换为Mat对象,并将这个新的IplImage对象与imshow函数一起使用 Mat ImgMat IplImage IplImg(ImgMat)//无误 cvNamedWindow(“Ipl”,CV_窗口_正常) cvShowImage(“Ipl”,IplImg);//抛出错误 但当涉及到将Mat对象转换为IplImage对象并

IplImage*IplImg

Mat ImgMat(IplImg)

imshow(“Mat”,ImgMat)

在OpenCV中,如上所述,我可以将IplImage对象转换为Mat对象,并将这个新的IplImage对象与imshow函数一起使用

Mat ImgMat

IplImage IplImg(ImgMat)//无误

cvNamedWindow(“Ipl”,CV_窗口_正常)

cvShowImage(“Ipl”,IplImg);//抛出错误

但当涉及到将Mat对象转换为IplImage对象并将此新对象与cvShowImage函数一起使用时,编译器会给出一个错误:“没有合适的从“IplImage”到“const CvArr*的转换函数”

你能帮我弄清楚为什么这个简单的操作不适用于cvShowImage吗


提前感谢。

cvShowImage
需要一个指向IplImage的指针

cvShowImage("Ipl",&IplImg); // should not throw