opencv保存图片到指定路径 opencv保存摄像头视频如何设置帧率?
opencv保存摄像头视频如何设置帧率?
Opencv读取视频,摄像机,保存最基本的视频代码#include“cv。H “#包含”highgui。H “int main(int argc,char**argv){cvcapture*capture=0 iplimage*frame=0 capture=cvcapturefromcam(0)//capture=cvcapturefromavi(”1)。Wmv “)//播放视频,更改为以下句子int FPS=25//捕获帧速率//double FPS=cvGetCaptureProperty(capture,CVCAPPROPufs)//视频帧速率cvvideowriter*writer=0//添加以下句子int iscolol=1 int framew=640 int frameh=480 writer=cvcreatevideowriter(”外出.avi,CV FourCC(“f”,“L“,”V“,”1”,FPS,cvsize(Frame w,Frame h),iscolol)cvnamedwindow(”camera“,1)//for(int i=0I<50i)//2秒for()//读取{Frame=cvqueryframe(capture)cvwriteframe(writer,Frame)cvshowimage(”camera“,frame)//显示图像cvwaitkey(1000/FPS)//视频速度}Cvreleasevideowriter(&writer)cvreleaseimage(&frame)cvreleasecapture(&capture)cvdestroywindow(“camera”)返回0
opencv保存图片到指定路径 opencv生成视频流 opencv 视频实时处理
版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。