opencv3.4.1mat和Iplimage*互转

opencv3.4.1mat和Iplimage*互转

Mat转IplImage
Mat Img=imread(“1.jpg”);
IplImage* pBinary = &IplImage(Img);//浅拷贝
IplImage *input = cvCloneImage(pBinary);//深拷贝

IplImage转Mat
IplImage* src = cvLoadImage(“1.jpg”, 1);
Mat img = cvarrToMat(src);

你可能感兴趣的:(opencv)