1. 程式人生 > >Mat轉IplImage IplImage轉Mat

Mat轉IplImage IplImage轉Mat

mage div str read binary bin string NPU var

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