码迷,mamicode.com
首页 > 其他好文 > 详细

OpenCV 3.0 CvMat and cv::Mat Conversion

时间:2016-08-17 06:46:52      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:

 

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); 

 

OpenCV 3.0 CvMat and cv::Mat Conversion

标签:

原文地址:http://www.cnblogs.com/grandyang/p/5778504.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!