I have:
Mat *depthImage = new Mat(480, 640, CV_8UC1, Scalar::all(0));
And further in my code I do:
Mat image = *depthImage;
I do some OpenCV stuff with it and then I want to use cvBlob
(so blob analysis). Though this function still uses IplImage
and not Mat
. So I wanted to convert them. I've read that I could just do this:
IplImage *blobimg = image;
But it doesn't work, I get this error:
Semantic Issue: No viable conversion from 'cv::Mat' to 'IplImage *' (aka '_IplImage *')
Eventually I want to be able to use this function on the newley created IplImage
cvLabel(<#const IplImage *img#>, <#IplImage *imgOut#>, <#CvBlobs &blobs#>)
As you can see the conversion from Mat
to IplImage
is required. But it is not working. My question is how do I fix this?
Thanks in advance