OpenCV 如何保存图片

来源:互联网 发布:windows mysql 客户端 编辑:程序博客网 时间:2024/04/28 11:06
里主要说明两种图片格式cv::Mat以及IplImage


如果图片是以Mat类型的格式表示的话,那么保存图片则用imwrite()函数
举例如下:
const char* path;
path="E:\\Data\\right\\right.bmp"
imwrite(path,riFrame);//riFrame为当前帧


如果图片是以IplImage类型的格式表示的话,那么保存图片则用cvSaveImage()函数
举例如下:
const char* path;
path="E:\\Data\\right\\right.bmp"
cvSaveImage(path,riFrame)
0 0
原创粉丝点击