近红外摄像头Point-Grey开发日志
来源:互联网 发布:德语助手 mac 注册码 编辑:程序博客网 时间:2024/04/28 09:01
近红外摄像头的sdk在官网下载:
Point Grey SDK
安装好sdk后,在Point Grey Research文件夹下(下面称为根目录),找到example程序:根目录/FlyCapture2/src/FlyCapture2Test
src文件夹下大部分都是示例程序,这里用Vs2010加载FlyCapture2Test工程,工程配置文件在根目录/FlyCapture2/src/vsprops下,选择对应的配置文件加载到项目中。
由于sdk是x64版本的,在VS中选择release, x64平台。
分析项目中FlyCapture2Test.cpp中的代码,发现摄像头的操作(打开摄像头,保存图像)其实很简单。
const int k_numImages = 10; Error error; Camera cam; // Connect to a camera error = cam.Connect(&guid);//连接摄像头,如果连接成功,返回PGRERROR_OK if (error != PGRERROR_OK) { PrintError( error ); return -1; } // Get the camera information CameraInfo camInfo; error = cam.GetCameraInfo(&camInfo);//获取摄像头信息 if (error != PGRERROR_OK) { PrintError( error ); return -1; } PrintCameraInfo(&camInfo); // Start capturing images error = cam.StartCapture();//启动摄像头,如果成功启动,返回PGRERROR_OK if (error != PGRERROR_OK) { PrintError( error ); return -1; } Image rawImage; for ( int imageCnt=0; imageCnt < k_numImages; imageCnt++ ) { // Retrieve an image error = cam.RetrieveBuffer( &rawImage );//获取帧,存储在Image rawImage里面 if (error != PGRERROR_OK) { PrintError( error ); continue; } cout << "Grabbed image " << imageCnt << endl; // Create a converted image Image convertedImage; // Convert the raw image error = rawImage.Convert( PIXEL_FORMAT_MONO8, &convertedImage );//转换图像,转换原因有待研究 if (error != PGRERROR_OK) { PrintError( error ); return -1; } // Create a unique filename ostringstream filename; filename << "FlyCapture2Test-" << camInfo.serialNumber << "-" << imageCnt << ".jpg"; // Save the image. If a file format is not passed in, then the file // extension is parsed to attempt to determine the file format. error = convertedImage.Save( filename.str().c_str() );//将转换后的图像存储起来,文件名为filename字符串的内容,以.jpg格式存储。 if (error != PGRERROR_OK) { PrintError( error ); return -1; } } // Stop capturing images error = cam.StopCapture();//停用摄像头 if (error != PGRERROR_OK) { PrintError( error ); return -1; } // Disconnect the camera error = cam.Disconnect(); if (error != PGRERROR_OK) { PrintError( error ); return -1; } return 0;
0 0
- 近红外摄像头Point-Grey开发日志
- 2.53 亿美元!红外热成像巨头 FLIR 收购工业相机领导者 Point Grey
- 红外摄像头
- 红外摄像头
- point grey的多相机采集问题
- Point Grey Camera 技术支持往返信件
- 近红外分析智能检测系统开发(佛山海天调味品有限公司)
- 基于OpenCV,简单的使用Point Grey的SDK在MFC上打开单个或多个Point Grey相机
- Kinect V2 开发专题(4)骨骼/深度/红外/摄像头数据获取
- Kinect V2 开发专题(4)骨骼/深度/红外/摄像头数据获取
- LeapMotion开发(三)--绘制示两个红外摄像头原始图像
- Android开发日志 摄像头视频流捕获
- Android开发日志 摄像头视频流捕获
- OpenCV和红外监控摄像头DIY
- How to make a Point Grey camera work with DirectShow applications/ Drivers of USB3.0 Cameras
- Point Grey Research官方驱动固件软件(Bumblebee相机系列软件)
- 红外
- 红外
- 【2013国家队互测】家族(family)
- 菜鸟's problem
- 在android中如何用线程来更新UI
- Spring security防止跨站请求伪造(CSRF防护)
- web.py – xml模版
- 近红外摄像头Point-Grey开发日志
- 关于iOS硬解码的一些感悟
- mysql_fetch_array和mysql_fetch_assoc以及mysql_fetch_row的区别
- 过滤数组中的数据,避免sql注入、xss等问题
- 博客系统优化升级公告
- Android界面架构实例之SlidingMenu(1)
- mysql根据排序结果来更新表
- 如何让ie6-8识别HTML5新标签
- JDBC和JTA事务区别