相机参数如下,参见这里

Resolution 1624 x 1224
Frame Rate 30 FPS
Megapixels 2.0 MP
Chroma Color
Sensor Name Sony ICX274
Sensor Type CCD
Readout Method Global shutter
Sensor Format 1/1.8"
Pixel Size 4.4 µm
Lens Mount C-mount
ADC 14-bit
Gain Range 0 dB to 24 dB
Exposure Range 0.02 ms to >10 seconds
Trigger Modes Standard, bulb, skip frames, overlapped, multi-shot
Partial Image Modes Pixel binning, ROI
Image Processing Gamma, lookup table, white balance
Image Buffer 32 MB
User Sets 2 memory channels for custom camera settings
Flash Memory 512 KB non-volatile memory
Non-isolated I/O Ports 2 bi-directional
Serial Port 1 (over non-isolated I/O)
Auxiliary Output 3.3 V, 150 mA maximum
Interface FireWire 1394b
Power Requirements 8 to 30 V
Power Consumption (Maximum) 3.5 W at 12 V
Dimensions 44 mm x 29 mm x 58 mm
Mass 104 g
Machine Vision Standard IIDC v1.31
Compliance CE, FCC, KCC, RoHS
Temperature (Operating) 0° to 40°C
Temperature (Storage) -30° to 60°C
Humidity (Operating) 20 to 80% (no condensation)
Humidity (Storage) 20 to 95% (no condensation)
Warranty 3 years

Sample Code for Capturing Images:

#include "FlyCapture2.h"
#include <string>
#include <vector>
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include <iostream> using namespace FlyCapture2;
using namespace std;
using namespace cv; enum AviType
{
UNCOMPRESSED,
MJPG,
H264
}; void PrintError( Error error )
{
error.PrintErrorTrace();
} void PrintCameraInfo( CameraInfo* pCamInfo )
{
printf(
"\n*** CAMERA INFORMATION ***\n"
"Serial number - %u\n"
"Camera model - %s\n"
"Camera vendor - %s\n"
"Sensor - %s\n"
"Resolution - %s\n"
"Firmware version - %s\n"
"Firmware build time - %s\n\n",
pCamInfo->serialNumber,
pCamInfo->modelName,
pCamInfo->vendorName,
pCamInfo->sensorInfo,
pCamInfo->sensorResolution,
pCamInfo->firmwareVersion,
pCamInfo->firmwareBuildTime );
} void SaveAviHelper(
AviType aviType,
std::vector<Image>& vecImages,
std::string aviFileName,
float frameRate)
{
Error error;
AVIRecorder aviRecorder; // Open the AVI file for appending images switch (aviType)
{
case UNCOMPRESSED:
{
AVIOption option;
option.frameRate = frameRate;
error = aviRecorder.AVIOpen(aviFileName.c_str(), &option);
}
break;
case MJPG:
{
MJPGOption option;
option.frameRate = frameRate;
option.quality = ;
error = aviRecorder.AVIOpen(aviFileName.c_str(), &option);
}
break;
case H264:
{
H264Option option;
option.frameRate = frameRate;
option.bitrate = ;
option.height = vecImages[].GetRows();
option.width = vecImages[].GetCols();
error = aviRecorder.AVIOpen(aviFileName.c_str(), &option);
}
break;
} if (error != PGRERROR_OK)
{
PrintError(error);
return;
} printf( "\nAppending %d images to AVI file: %s ... \n", vecImages.size(), aviFileName.c_str() );
for (int imageCnt = ; imageCnt < vecImages.size(); imageCnt++)
{
// Append the image to AVI file
error = aviRecorder.AVIAppend(&vecImages[imageCnt]);
if (error != PGRERROR_OK)
{
PrintError(error);
continue;
} printf("Appended image %d...\n", imageCnt);
} // Close the AVI file
error = aviRecorder.AVIClose( );
if (error != PGRERROR_OK)
{
PrintError(error);
return;
}
} int main(int /*argc*/, char** /*argv*/)
{
Error error;
BusManager busMgr;
unsigned int numCameras;
error = busMgr.GetNumOfCameras(&numCameras);
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
}
cout << "numCameras = " << numCameras << endl;
if ( numCameras < )
{
printf( "No camera detected.\n" );
return -;
}
else
{
printf( "Number of cameras detected: %u\n", numCameras );
} PGRGuid guid;
error = busMgr.GetCameraFromIndex(, &guid);
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
}
printf( "Running the first camera.\n" ); Camera cam;
// Connect to a camera
error = cam.Connect(&guid);
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
} // Get the camera information
CameraInfo camInfo;
error = cam.GetCameraInfo(&camInfo);
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
}
PrintCameraInfo(&camInfo); // Start capturing images
printf( "Starting capture... \n" );
error = cam.StartCapture();
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
} // The total number of images
const int k_numImages = ;
std::vector<Image> vecImages;
vecImages.resize(k_numImages); // Grab images
Image rawImage;
for ( int imageCnt=; imageCnt < k_numImages; imageCnt++ )
{
error = cam.RetrieveBuffer(&rawImage);
if (error != PGRERROR_OK)
{
printf("Error grabbing image %u\n", imageCnt);
continue;
}
else
{
printf("Grabbed image %u\n", imageCnt);
} vecImages[imageCnt].DeepCopy(&rawImage);
} // Stop capturing images
printf( "Stopping capture... \n" );
error = cam.StopCapture();
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
} // Check if the camera supports the FRAME_RATE property
printf( "Detecting frame rate from camera... \n" );
PropertyInfo propInfo;
propInfo.type = FRAME_RATE;
error = cam.GetPropertyInfo( &propInfo );
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
} float frameRateToUse = 15.0f;
if ( propInfo.present == true )
{
// Get the frame rate
Property prop;
prop.type = FRAME_RATE;
error = cam.GetProperty( &prop );
if (error != PGRERROR_OK)
{
PrintError(error);
}
else
{
// Set the frame rate.
// Note that the actual recording frame rate may be slower,
// depending on the bus speed and disk writing speed.
frameRateToUse = prop.absValue;
}
} printf("Using frame rate of %3.1f\n", frameRateToUse); char aviFileName[] = {}; sprintf(aviFileName, "SaveImageToAviEx-Uncompressed-%u", camInfo.serialNumber);
SaveAviHelper(UNCOMPRESSED, vecImages, aviFileName, frameRateToUse); // Disconnect the camera
error = cam.Disconnect();
if (error != PGRERROR_OK)
{
PrintError(error);
return -;
} system("Pause");
return ;
}

Grasshopper 2.0 MP Color FireWire 1394b (Sony ICX274)的更多相关文章

  1. css hover 动画 transition:background-color 0.2s,color 0.2s; 外层套内层,正常是 里外层 鼠标上来 外层有hover,如果就想到里层hover触发外层hover,要用外层position 定义绝对定位,内层的hover跳出外层的div,这样视觉上就是两个单独的div,进行内外层联动。

    css hover 动画 transition:background-color 0.2s,color 0.2s; 外层套内层,正常是 里外层 鼠标上来 外层有hover,如果就想到里层hover触发 ...

  2. [ActionScript 3.0] 运用Color类interpolateColor静态方法绘制渐变色

    以下类可直接作为文档类测试,效果如图: package { import fl.motion.Color; import flash.display.GradientType; import flas ...

  3. 使用URLConnection获取网页信息的基本流程 分类: H1_ANDROID 2013-10-12 23:51 3646人阅读 评论(0) 收藏

    参考自core java v2, chapter3 Networking. 注:URLConnection的子类HttpURLConnection被广泛用于Android网络客户端编程,它与apach ...

  4. TensorFlow2.0(9):TensorBoard可视化

    .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px so ...

  5. (转)System.Drawing.Color的颜色对照表

    经常使用System.Drawing.Color, 本篇介绍一下颜色与名称及RGB值的对应关系. 1. 颜色与名称的对照表(点击下图放大看): 2. 颜色与RGB值对照表: Color.AliceBl ...

  6. JHChart 1.1.0 iOS图表工具库中文ReadMe

    JHChart(最新版本1.1.0) 好吧,的确当前的github上已经存有不少的iOS图表工具库,然而,当公司的项目需要图表时,几乎没有哪个第三方能够完全满足我的项目需求.无奈之下,本人不得不花费一 ...

  7. CM12.1/13.0编译教程

    环境搭建 1.安装64位Ubuntu系统(实体安装.虚拟机安装均可) 注意:要求机器至少4G内存(虚拟机至少分配4G内存),硬盘至少100G空间(源码20G+,编译后整个目录约60~70G) 安装方法 ...

  8. Vue 2.0 + Vue Router + Vuex

    用 Vue.js 2.x 与相配套的 Vue Router.Vuex 搭建了一个最基本的后台管理系统的骨架. 当然先要安装 node.js(包括了 npm).vue-cli 项目结构如图所示: ass ...

  9. eclipse Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Sertomcat

    eclipse Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Serto ...

随机推荐

  1. 【转】 Mybatis/Ibatis,数据库操作的返回值

    该问题,我百度了下,根本没发现什么有价值的文章:还是看源代码(详见最后附录)中的注释,最有效了!insert,返回值是:新插入行的主键(primary key):需要包含<selectKey&g ...

  2. 2013 ACM/ICPC 南京网络赛F题

    题意:给出一个4×4的点阵,连接相邻点可以构成一个九宫格,每个小格边长为1.从没有边的点阵开始,两人轮流向点阵中加边,如果加入的边构成了新的边长为1的小正方形,则加边的人得分.构成几个得几分,最终完成 ...

  3. Mobile first! Wijmo 5 + Ionic Framework之:Hello World!

    本教程中,我们用Wijmo 5 和 Ionic Framework实现一个Mobile的工程:Hello World. Ionic是什么? Ionic是一个HTML5框架.免费.开源,用于帮助生成hy ...

  4. percona-xtrabackup备份mysql

    title: 1.percona-xtrabackup备份mysql date: 2016-04-10 23:19:12 tags: mysql categories: mysql --- 一.per ...

  5. ubuntu使用root账户登录

    1.先设定一个root的密码 sudo passwd root 2.编辑lightdm.conf sudo gedit /etc/lightdm/lightdm.conf 最后一行添加 greeter ...

  6. [MAC] mac系统如何显示和隐藏文件

    转载地址: http://www.cnblogs.com/lm3515/archive/2010/12/08/1900271.html 显示Mac隐藏文件的命令:defaults write com. ...

  7. Maven类包冲突终极解决方案

    本文转自:http://ian.wang/106.htm 举例A依赖于B及C,而B又依赖于X.Y,而C依赖于X.M,则A除引B及C的依赖包下,还会引入X,Y,M的依赖包(一般情况下了,Maven可通过 ...

  8. 二进制日志BINARY LOG清理

    mysql> show master logs; +------------------+-----------+ | Log_name | File_size | +------------- ...

  9. mysql优化总结

    SQL优化目的: 降低响应时间 直接影响用户体验度 降低资源使用率 主要体现在IO和CPU上,网络.内存消耗 优化原则: 1.IN子查询改成JOIN2.NOT IN子查询改成LEFT JOIN3.消除 ...

  10. hdu 1312:Red and Black(DFS搜索,入门题)

    Red and Black Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...