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

asked 2016-09-18 08:05:24 -0600

thdrksdfthmn gravatar image

updated 2016-09-18 08:06:01 -0600

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

edit retag flag offensive close merge delete

Comments

1
sturkmen gravatar imagesturkmen ( 2016-09-18 09:07:55 -0600 )edit