videoInput样例
来源:互联网 发布:txt数据导入excel 编辑:程序博客网 时间:2024/06/08 09:33
这是来源于videoInput.h中的一个例子:
//create a videoInput objectvideoInput VI;//Prints out a list of available devices and returns num of devices foundint numDevices = VI.listDevices();int device1 = 0; //this could be any deviceID that shows up in listDevicesint device2 = 1; //this could be any deviceID that shows up in listDevices//if you want to capture at a different frame rate (default is 30) //specify it here, you are not guaranteed to get this fps though.//VI.setIdealFramerate(dev, 60);//setup the first device - there are a number of options:VI.setupDevice(device1); //setup the first device with the default settings//VI.setupDevice(device1, VI_COMPOSITE); //or setup device with specific connection type//VI.setupDevice(device1, 320, 240); //or setup device with specified video size//VI.setupDevice(device1, 320, 240, VI_COMPOSITE); //or setup device with video size and connection type//VI.setFormat(device1, VI_NTSC_M);//if your card doesn't remember what format it should be//call this with the appropriate format listed above//NOTE: must be called after setupDevice!//optionally setup a second (or third, fourth ...) device - same options as aboveVI.setupDevice(device2); //As requested width and height can not always be accomodated//make sure to check the size once the device is setupint width = VI.getWidth(device1);int height = VI.getHeight(device1);int size= VI.getSize(device1);unsigned char * yourBuffer1 = new unsigned char[size];unsigned char * yourBuffer2 = new unsigned char[size];//to get the data from the device first check if the data is newif(VI.isFrameNew(device1)){VI.getPixels(device1, yourBuffer1, false, false);//fills pixels as a BGR (for openCV) unsigned char array - no flippingVI.getPixels(device1, yourBuffer2, true, true); //fills pixels as a RGB (for openGL) unsigned char array - flipping!}//same applies to device2 etc//to get a settings dialog for the deviceVI.showSettingsWindow(device1);//Shut down devices properlyVI.stopDevice(device1);VI.stopDevice(device2);
- videoInput样例
- opencv与videoInput
- videoInput函数列表
- videoInput 与VideoCapture
- 使用videoInput获取图像数据
- OpenCV实例:基于videoInput的视频录像机
- VideoInput库 + Opencv2.3.1 + 无线摄像头 + VC2010
- OpenCV+VideoInput 捕捉摄像头+人脸检测
- VideoInput库 + Opencv2.3.1 + 无线摄像头 + VC2010
- 使用Qt+OpenCV+VideoInput 显示摄像头图像
- 基于VideoInput的摄像头操作类
- MATLAB编程->MATLAB2014a videoinput读取摄像头
- OpenCV使用VideoInput库从摄像头捕获视频
- Capture video from USB by using OpenCV videoInput
- 高版本Opencv内置的videoInput库的使用方法(1)
- 高版本Opencv内置的videoInput库的使用方法(2)
- 高版本Opencv内置的videoInput库的使用方法
- 高版本Opencv内置的videoInput库的使用方法(2)
- [转载] 字符集与字符编码简介
- 关于大批量数据上传和更新的方法
- 输入法移植
- KMP算法
- 高斯模糊理论与应用
- videoInput样例
- div+css模仿框架布局
- 市民花百元装Win7“尝鲜”
- ASP.NET(C#)中web.config
- WinForm下的TextBox只能输入整数(可正可负)
- 制作FFmpeg SDK for MS Visual Studio
- oracle Constraint[类似 constraint用法总结 I]
- Script & Tool之CreateFetureClasses
- 百练2698 八皇后