Mat转IplImage
Mat Img=imread("1.jpg");
IplImage* pBinary = &IplImage(Img);//浅拷贝
IplImage *input = cvCloneImage(pBinary);//深拷贝只要再加一次复制数据
IplImage转Mat
IplImage* src = cvLoadImage("1.jpg", 0);
Mat img = cvarrToMat(src);//把二值化后的src转换为Mat类型
Mat转IplImage IplImage转Mat
原文:https://www.cnblogs.com/volvane/p/10189869.html