opencv Mat与Iplimage相互转化
2016-07-25 15:57
387 查看
学习opencv的时候,发现调用摄像头采集时,如
VideoCapture camera(0);
Mat frame;
camera>>frame;
是可以的,但是
IplImage *Image;
不可以有“camera>>Image”
这就有点麻烦了,因为有的函数参数是IplImage类型的,所以就查了下资料
1、将Mat转换为IplImage
operator IplImage() const;
举例:Mat img;
IplImage *src;
src=&IplImage(img);
2、将IplImage转换为Mat
Mat(const IplImage* img, bool copyData=false);
VideoCapture camera(0);
Mat frame;
camera>>frame;
是可以的,但是
IplImage *Image;
不可以有“camera>>Image”
这就有点麻烦了,因为有的函数参数是IplImage类型的,所以就查了下资料
1、将Mat转换为IplImage
operator IplImage() const;
举例:Mat img;
IplImage *src;
src=&IplImage(img);
2、将IplImage转换为Mat
Mat(const IplImage* img, bool copyData=false);
相关文章推荐
- 峰值架构
- 关于Linux下.so的介绍和编写过程
- (一)安装openoffice.org
- Linux进程通信(四)IPC共享内存
- shell--3.运算符
- Linux学习----开启篇
- linux下安装jdk
- IT-个人运维经验小计
- Windows Azure中WebSite 网站, Cloud Service 云服务,Virtual Machine 虚拟机的比较
- scp不用密码远程拷贝
- linux jenkins添加windows节点,实现自动化部署
- cmake的使用教程(linux版)(一)
- Linux下恢复误删文件:思路+实践
- Annoying “Remote System Explorer Operation” causing freeze for couple of seconds
- Hadoop词频统计(二)之本地模式运行
- linux入门常用命令
- linux kernel input 子系统分析
- 爹地,我找到了!,15个极好的Linux find命令示例
- nginx + tomcat 架构中,error_page错误页面的设置
- linux手贱操作