IplImage* conversion problem
Hi,
After lots of trying, I'm left with 1 issue:
IplImage* imageThresh = cvCreateImage(cvGetSize(image), 8, 1);
Mat imageThreshMat = Mat(imageThresh, false);
<some code that needs Mat>
imageThresh->imageData = (char *) imageThreshMat.data;
return imageThresh;
The return gives error: "could not convert ‘imageThresh’ from ‘IplImage* {aka _IplImage*}’ to ‘IplImage {aka _IplImage}’". How can I do this conversion ?
Code after change:
<omitting code needing Mat>
imageHSV->imageData = (char *) imageHSVMat.data;
cvReleaseImage(&imageHSV);
*imageThresh = imageThreshMat.operator _IplImage();
return imageThresh;
This still gives the conversion error with return.