开发者

opencv conversion from a Mat element to IplImage *

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜