开发者

opencv conversion from a Mat element to IplImage *

开发者 https://www.devze.com 2023-01-02 21:01 出处:网络
How can I c开发者_开发知识库onvert a Mat element to IplImage * element? Please Help!Mat mat_img;

How can I c开发者_开发知识库onvert a Mat element to IplImage * element? Please Help!


Mat mat_img;
//....
IplImage ipl_img = mat_img;

This puts a header of IplImage on top of mat_img so there is no copying. You can pass &ipl_img to function which need IplImage*.


Mat to IplImage :

IplImage *image = new IplImage(mat_img);

IplImage to Mat :

Mat image(ipl_img);
0

精彩评论

暂无评论...
验证码 换一张
取 消