opencv: 基本知识(二);

1、cvArr* 与 cv::Mat之间的转换;

1   cv::Mat  ---- > cvArr*
2       cv::Mat   img;
3       IplImage  temp = IplImage(img);
4       cvArr *pTemp = (cvArr *)&temp;
5 
6       cvArr* ------> cv::Mat
7       cvArr *ptemp;
8       cv::Mat  temp = cv::cvarrToMat(pTemp);

 注: 该博文为扩展型;

猜你喜欢

转载自www.cnblogs.com/yinwei-space/p/9817481.html