I searched to convert an IplImage* to Mat, but all answers were about the conversion to cvMat.
How, can I do it? and what is the difference between Mat and cvMat?
cv::Mat or Mat, both are same.
Mat has a operator CvMat() so simple assignment works
Convert Mat to CvMat
Mat mat = ---------;
CvMat cvmat = mat;
Convert CVMat to Mat
Mat dst = Mat(cvmat, true);
Convert Mat to IplImage*
> For Single Channel
IplImage* image = cvCloneImage(&(IplImage)mat);
> For Three Channel
IplImage* image = cvCreateImage(cvSize(mat.cols, mat.rows), 8, 3);
IplImage ipltemp = mat;
cvCopy(&ipltemp, image);
Hope this helps you. Cheers :)