Opencv Mat与Iplimage的相互转换

来源:互联网 发布:c语言写游戏 编辑:程序博客网 时间:2024/05/16 18:29

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);

0 0
原创粉丝点击