Opencv Mat与Iplimage的相互转换

时间:2021-08-05 17:50:42

1、将Mat转换为IplImage

//! converts header to IplImage; no data is copied
    operator IplImage() const;

举例:Mat img;

            IplImage *src;

             src=&IplImage(img);

2、将IplImage转换为Mat

//! converts old-style IplImage to the new matrix; the data is not copied by default
    Mat(const IplImage* img, bool copyData=false);