OpenCV 3.0 CvMat and cv::Mat Conversion

 

After OpenCV 3.0, CvMat cannot be directly converted to cv::Mat, we need to use function cvarrToMat() to do it. Please see the code below:

 

CvMat *cm;
cv::Mat m;

// Before OpenCV 3.0
m = cm; 
m = cv::Mat(cm); 

// After OpenCV 3.0
m = cv::cvarrToMat(cm); 

 

posted @ 2016-08-17 06:29  Grandyang  阅读(1082)  评论(0编辑  收藏  举报
Fork me on GitHub