I know only C language, so I am getting confusion/not understanding the syntax of the openCV data types particularly in cv::Mat, CvMat*, Mat.
My question is How can I convert cv::Mat to const CvMat* or CvMat*, and can any one provide documentation link for difference between CvMat *mat and cv::Mat and Mat in opencv2.4.
and How can I convert my int data to float data in CvMat ?
Thank you
cv::Mathas a operator CvMat() so simple assignment works:This uses the same underlying data so you have to be careful that the
cv::Matdoesn’t go out of scope before theCvMat.If you need to use the
CvMatin an API that takes aCvMat*, then pass the address of the object:As for the difference between
cv::MatandMat, they are the same. InOpenCVexamples, it is often assumed (and I don’t think this is a good idea) thatusing namespace cvis used.