opencv 中压缩视频保存视频 writer=cvCreateVideoWriter("out4.avi",fourcc, fps, cvSize( DispImage->width, DispImage->height), 1 );
用cvCreateVideoWriter 函数 中的参数 fourcc 和fps 分别选择什么样的数值。可以保证录像时间五分钟,最后的保存时间也是5分钟? 谢谢了 加: 当fourcc 选1,-1,2 都可以生成avi 文件, 当fourcc 选CV_FOURCC('P','I','M','1'),没法生成avi 为何? 谢谢啦
解决方案 »
- 求 笔记本电池测试 程式 如何读电池信息? 求高手 超高手 解答
- access数据类型
- 关于DirectShow的Transfer过滤器的问题
- ActiveX控件无法调用接口函数的问题
- 用vc向导生成单文档程序框架,如何去掉最大化按钮?
- 如何在CDateTimeCtrl和CComboBox的属性为disable改变背景色和字体颜色,在线等待
- MP3随身听用充电电池可以吗?
- 深入浅出mfc第二版中是不是用的VC5和MFC4,现在VC6中变化多不多?谢谢
- 求救
- sos 紧急呼叫:如何动态隐藏propertySheet,
- 迷惑,视图类里添加宏wm_keydown选项问题
- 基于XML文本格式的socket通讯
static IntPtr cvCreateVideoWriter(
String^ filename,
int fourcc,
double fps,
Size frameSize,
bool isColor
)Parameters
filename
String
Name of the output video file.
fourcc
Int32
4-character code of codec used to compress the frames. For example, CV_FOURCC('P','I','M','1') is MPEG-1 codec, CV_FOURCC('M','J','P','G') is motion-jpeg codec etc.
fps
Double
Framerate of the created video stream.
frameSize
Size
Size of video frames.
isColor
Boolean
If it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames
Return Value
The video writer先看看接口说明