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);
精彩评论