Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a Mat constructor that has const IplImage* as parameter?

Hi,

I have started to check the OpenCV version 3 and I started to see all the tutorials and docs (for fun and enrichment of my knowledge). First thing that I found is that

Create a header for an already existing IplImage pointer:

IplImage* img = cvLoadImage("greatwave.png", 1);
Mat mtx(img); // convert IplImage* -> Mat

VS 2015 is not recognizing the Mat constructor with IplImage pointer:

error C2664: 'cv::Mat::Mat(cv::Mat &&)': cannot convert argument 1 from 'IplImage *' to 'const cv::cuda::GpuMat &'

Is there a special header to be added, or this constructor is no more in version 3?

Either the case, the tuto should be updated

Is there a Mat constructor that has const IplImage* as parameter?

Hi,

I have started to check the OpenCV version 3 and I started to see all the tutorials and docs (for fun and enrichment of my knowledge). First thing that I found is that

Create a header for an already existing IplImage pointer:

IplImage* img = cvLoadImage("greatwave.png", 1);
Mat mtx(img); // convert IplImage* -> Mat

VS 2015 is not recognizing the Mat constructor with IplImage pointer:

error C2664: 'cv::Mat::Mat(cv::Mat &&)': cannot convert argument 1 from 'IplImage *' to 'const cv::cuda::GpuMat &'

Is there a special header to be added, or this constructor is no more in version 3?

Either the case, the tuto should be updated