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
C++ 在opencv 3.0中将mat转换为ipl图像_C++_Opencv_Mat_Iplimage - Fatal编程技术网

C++ 在opencv 3.0中将mat转换为ipl图像

C++ 在opencv 3.0中将mat转换为ipl图像,c++,opencv,mat,iplimage,C++,Opencv,Mat,Iplimage,我试图将mat图像转换为IplImage,但我无法转换,我尝试了如下操作 Mat frame=imread("image path"); IplImage* image=IplImage(frame); 我在初始化过程中遇到了如下错误:无法将'IplImage{aka{u IplImage}'转换为'IplImage*{aka{u IplImage*}'。请告诉任何人如何在opencv 3.0中转换,不要这样做。IplImage在3.0中被大量弃用。如果必须使用IplImage来解决依赖性问题

我试图将mat图像转换为IplImage,但我无法转换,我尝试了如下操作

Mat frame=imread("image path");
IplImage* image=IplImage(frame);

我在初始化过程中遇到了如下错误:无法将'IplImage{aka{u IplImage}'转换为'IplImage*{aka{u IplImage*}'。请告诉任何人如何在opencv 3.0中转换,不要这样做。IplImage在3.0中被大量弃用。如果必须使用IplImage来解决依赖性问题/遗留代码,那么请使用较旧版本的opencv。它们删除了3.0 api中的任何转换。请不要在第一位使用IplImages。除了弃用之外,上面的错误只表明编译器无法从对象转换为指针;IplImage*图像=新IplImageframe;应该做到这一点——不过,不要忘了稍后删除指针。至少这在2.4.9中仍然有效,而且3.0中的结构似乎仍然具有构造函数。也可能重复:;