opencv conversion from a Mat element to IplImage *

匿名 (未验证) 提交于 2019-12-03 00:48:01

问题:

How can I convert a Mat element to IplImage * element? Please Help!

回答1:

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*.



回答2:

Mat to IplImage :

IplImage *image = new IplImage(mat_img); 

IplImage to Mat :

Mat image(ipl_img); 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!