opencv下实现显示并更改摄像头分辨率,帧率,同时能显示多个摄像头,基于Opencv2.0以后的版本
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 49664 2015-05-27 14:25 更改摄像头分辨率DebugShowVideoframe.exe
文件 406 2015-05-27 09:29 更改摄像头分辨率DebugShowVideoframe.exe.manifest
文件 1099728 2015-05-27 14:25 更改摄像头分辨率DebugShowVideoframe.ilk
文件 1600512 2015-05-27 14:25 更改摄像头分辨率DebugShowVideoframe.pdb
文件 57278464 2015-05-27 14:24 更改摄像头分辨率ipchshowvideoframe-17c5adc1showvideoframe-6b3871af.ipch
文件 12800 2015-05-27 09:29 更改摄像头分辨率ReleaseShowVideoframe.exe
文件 406 2015-05-27 09:29 更改摄像头分辨率ReleaseShowVideoframe.exe.manifest
文件 969728 2015-05-27 09:29 更改摄像头分辨率ReleaseShowVideoframe.pdb
文件 2009 2015-05-27 14:25 更改摄像头分辨率ShowVideoframe13_ShowVideoframe.cpp
文件 155161 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebug13_ShowVideoframe.obj
文件 1602 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugcl.command.1.tlog
文件 31256 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugCL.read.1.tlog
文件 912 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugCL.write.1.tlog
文件 4702 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebuglink.command.1.tlog
文件 9588 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebuglink.read.1.tlog
文件 1496 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebuglink.write.1.tlog
文件 1022 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugmt.command.1.tlog
文件 698 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugmt.read.1.tlog
文件 392 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugmt.write.1.tlog
文件 381 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugShowVideoframe.exe.intermediate.manifest
文件 64 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugShowVideoframe.lastbuildstate
文件 2767 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugShowVideoframe.log
文件 0 2015-05-27 09:29 更改摄像头分辨率ShowVideoframeDebugShowVideoframe.write.1.tlog
文件 617472 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugvc100.idb
文件 987136 2015-05-27 14:25 更改摄像头分辨率ShowVideoframeDebugvc100.pdb
文件 1086550 2015-05-27 09:29 更改摄像头分辨率ShowVideoframeRelease13_ShowVideoframe.obj
文件 864 2015-05-27 09:29 更改摄像头分辨率ShowVideoframeReleasecl.command.1.tlog
文件 15578 2015-05-27 09:29 更改摄像头分辨率ShowVideoframeReleaseCL.read.1.tlog
文件 528 2015-05-27 09:29 更改摄像头分辨率ShowVideoframeReleaseCL.write.1.tlog
文件 2514 2015-05-27 09:29 更改摄像头分辨率ShowVideoframeReleaselink.command.1.tlog
............此处省略27个文件信息
//--------------------------------------【程序说明】-------------------------------------------
// 程序说明:《OpenCV3编程入门》OpenCV2版书本附赠示例程序13
// 程序描述:摄像头帧频检测
// 测试所用操作系统: Windows 7 64bit
// 测试所用IDE版本:Visual Studio 2010
// 测试所用OpenCV版本: 2.4.9
// 2014年11月 Revised by @浅墨_毛星云
//------------------------------------------------------------------------------------------------
//Code to check the OpenCV installation on Raspberry Pi and mesaure frame rate
//Author: Samarth Manoj Brahmbhatt University of Pennsyalvania
//---------------------------------【头文件、命名空间包含部分】----------------------------
// 描述:包含程序所使用的头文件和命名空间
//------------------------------------------------------------------------------------------------
#include
#include
#include
using namespace std;
using namespace cv;
//-----------------------------------【main( )函数】--------------------------------------------
// 描述:控制台应用程序的入口函数,我们的程序从这里开始
//-------------------------------------------------------------------------------------------------
int main()
{
VideoCapture cap;
cap = VideoCapture(CV_CAP_DSHOW);
#if 0
cap.set(CV_CAP_PROP_frame_WIDTH 320);
cap.set(CV_CAP_PROP_frame_HEIGHT 240);
// cap.set(CV_CAP_PROP_FPS 20);
#endif
//获取视频帧的宽度
double dWidth = cap.get(CV_CAP_PROP_frame_WIDTH);
//获取视频帧的高度
double dHeight = cap.get(CV_CAP_PROP_frame_HEIGHT);
cout << “视频帧尺寸 : “ << dWidth << “ x “ << dHeight << endl;
//获取视频的帧速率
double fps = cap.get(CV_CAP_PROP_FPS);
cout << “帧/秒:“ << fps << endl;
Mat im im_g;
double time = 0;
unsigned int frames = 0;
while(char(waitKey(1)) != ‘q‘)
{
double t0 = getTickCount();
cap >> im;
frames++;
imshow(“cap1“ im);
time += (getTickCount() - t0) / getTickFrequency();
// cout << frames / time << “ fps“ << endl;
}
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 49664 2015-05-27 14:25 更改摄像头分辨率DebugShowVideofr
文件 406 2015-05-27 09:29 更改摄像头分辨率DebugShowVideofr
文件 1099728 2015-05-27 14:25 更改摄像头分辨率DebugShowVideofr
文件 1600512 2015-05-27 14:25 更改摄像头分辨率DebugShowVideofr
文件 57278464 2015-05-27 14:24 更改摄像头分辨率ipchshowvideofr
文件 12800 2015-05-27 09:29 更改摄像头分辨率ReleaseShowVideofr
文件 406 2015-05-27 09:29 更改摄像头分辨率ReleaseShowVideofr
文件 969728 2015-05-27 09:29 更改摄像头分辨率ReleaseShowVideofr
文件 2009 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 155161 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 1602 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 31256 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 912 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 4702 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 9588 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 1496 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 1022 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 698 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 392 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 381 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 64 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 2767 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 0 2015-05-27 09:29 更改摄像头分辨率ShowVideofr
文件 617472 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 987136 2015-05-27 14:25 更改摄像头分辨率ShowVideofr
文件 1086550 2015-05-27 09:29 更改摄像头分辨率ShowVideofr
文件 864 2015-05-27 09:29 更改摄像头分辨率ShowVideofr
文件 15578 2015-05-27 09:29 更改摄像头分辨率ShowVideofr
文件 528 2015-05-27 09:29 更改摄像头分辨率ShowVideofr
文件 2514 2015-05-27 09:29 更改摄像头分辨率ShowVideofr
............此处省略27个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)