Grasshopper 2.0 MP Color FireWire 1394b (Sony ICX274)

相机参数如下,参见这里:
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)的更多相关文章
- 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触发 ...
- [ActionScript 3.0] 运用Color类interpolateColor静态方法绘制渐变色
以下类可直接作为文档类测试,效果如图: package { import fl.motion.Color; import flash.display.GradientType; import flas ...
- 使用URLConnection获取网页信息的基本流程 分类: H1_ANDROID 2013-10-12 23:51 3646人阅读 评论(0) 收藏
参考自core java v2, chapter3 Networking. 注:URLConnection的子类HttpURLConnection被广泛用于Android网络客户端编程,它与apach ...
- TensorFlow2.0(9):TensorBoard可视化
.caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px so ...
- (转)System.Drawing.Color的颜色对照表
经常使用System.Drawing.Color, 本篇介绍一下颜色与名称及RGB值的对应关系. 1. 颜色与名称的对照表(点击下图放大看): 2. 颜色与RGB值对照表: Color.AliceBl ...
- JHChart 1.1.0 iOS图表工具库中文ReadMe
JHChart(最新版本1.1.0) 好吧,的确当前的github上已经存有不少的iOS图表工具库,然而,当公司的项目需要图表时,几乎没有哪个第三方能够完全满足我的项目需求.无奈之下,本人不得不花费一 ...
- CM12.1/13.0编译教程
环境搭建 1.安装64位Ubuntu系统(实体安装.虚拟机安装均可) 注意:要求机器至少4G内存(虚拟机至少分配4G内存),硬盘至少100G空间(源码20G+,编译后整个目录约60~70G) 安装方法 ...
- Vue 2.0 + Vue Router + Vuex
用 Vue.js 2.x 与相配套的 Vue Router.Vuex 搭建了一个最基本的后台管理系统的骨架. 当然先要安装 node.js(包括了 npm).vue-cli 项目结构如图所示: ass ...
- 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 ...
随机推荐
- 《ASP.NET1200例》实现投票的用户控件
用户控件ascx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="24 ...
- 更改SharePoint 2010 顶部导航为下拉菜单样式
更改SharePoint 2010 顶部导航为下拉菜单样式 最后的效果图: 假如一个网站集顶级站点下面有子网站:sub site1,该子站点下面又有两个子站点:sub site1_1,sub si ...
- 39.递归颠倒栈[ReverseStack]
[题目] 用递归颠倒一个栈.例如输入栈{1, 2, 3, 4, 5},1在栈顶.颠倒之后的栈为{5, 4, 3, 2, 1},5处在栈顶. [分析] 乍一看到这道题目,第一反应是把栈里的所有元素逐一p ...
- windows和linux下mysql的重启命令
在 Windows 下: 开始->运行->cmd启动:net start mysql停止:net stop mysql 无重启,必须先停止再启动!!! 在LINUX 下: 启动:/etc/ ...
- c# 获取屏幕DPI
方法一:用ManagementClass来获取.需要引入System.Management.dll; using (ManagementClass mc = new ManagementClass(& ...
- 【JAVA、C++】LeetCode 004 Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two ...
- Java for LeetCode 055 Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the arra ...
- hdu 1233 还是畅通工程 解题报告
题目链接:http://code.hdu.edu.cn/showproblem.php?pid=1233 并查集的运用, 实质就是求最小生成树.先对所有的村庄距离从小到大排序,然后判断村庄之间是否属于 ...
- Ubuntu安装steam游戏平台的解决方案
steam是一个游戏平台,上面提供了很多收费和免费的游戏,在安装的过程中遇到了一些问题,所以把自己遇到的问题及解决方案分享出来供大家参考. 第一步:安装steam平台 sudo apt-get ins ...
- Python Elasticsearch api
描述:ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.下面介绍了利用Python API接口进行数据查询,方便 ...