在OpenCV中创建AVI文件 [英] Creating AVI files in OpenCV

查看:86
本文介绍了在OpenCV中创建AVI文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用OpenCV和Visual Studio 2008创建一个应用程序,以从网络摄像头捕获图像,对其应用滤镜,然后将其写入AVI文件. 一切正常,除了创建AVI文件.

I have been trying to create an application using OpenCV and Visual Studio 2008, to capture images from a webcam, apply a filter to them, and then write them to an AVI file. Everything works, except creating the AVI file.

问题是它可以在我的计算机上运行,​​但不能在同事的计算机上运行.原因(我认为)是因为他没有供OpenCV使用的必要视频编码器.

The problem is that it works on my computer, but it doesn't work on my colleague's computer. The reason for that (I think) is that he does not have the necessary video encoders for OpenCV to use.

cvCreateVideoWriter函数不会返回NULL,但最终在磁盘上有一个0kb的文件.

The cvCreateVideoWriter function does not return NULL, but I end up with a 0kb file on the disk.

推荐答案

问题是我的同事安装了旧版本的OpenCV.如果我使用新的OpenCV,则它具有编码器,并且可以完成所有工作.

The problem was that my colleague had an older version of OpenCV installed. If I used the new OpenCV it had an encoder and it did all the work.

这篇关于在OpenCV中创建AVI文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆