版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sss_369/article/details/84147194
1. Mat -->IplImage
Mat mat_img=imread("samples.bmp");
IplImage* ipl_img;
ipl_img = &IplImage(mat_img);
2. IplImage--->Mat
IplImage* ipl_img = cvLoadImage("samples.bmp");;
Mat mat_img;
mat_img = Mat(ipl_img);//Mat(const IplImage* img, bool copyData=false);
//mat_img = cvarrToMat(ipl_img);//3.x版本