相机参数如下,参见这里

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. N-Queens | & N-Queens II

    The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens ...

  2. 21.左旋转字符串[LeftRotateString]

    [题目] 定义字符串的左旋转操作:把字符串前面的若干个字符移动到字符串的尾部.如把字符串AB1234 左旋转2位得到字符串1234AB.请实现字符串左旋转的函数.要求时间对长度为n的字符串操作的复杂度 ...

  3. cocos2d-x的Android工程开启c++0x特性

    首先一定要确定你所安装NDK支持c++0x(我安装的android-ndk-r8) 文本打开 项目目录/proj.android/jni/Application.mk 在APP_CPPFLAGS那一行 ...

  4. Java for LeetCode 024 Swap Nodes in Pairs

    Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2-& ...

  5. iOS通过设置info.plist参数使用iTunes导入导出Documents目录下的文件

    参考网址: http://my.oschina.net/hmj/blog/112592 http://www.cnblogs.com/taintain1984/archive/2013/05/27/3 ...

  6. [MAC] SVN lock的使用

    转载 : http://www.eefocus.com/czzheng/blog/12-03/245532_4ca94.html 如果压根没有锁lock,那么每个人都拥有一个本地copy,每个人都能自 ...

  7. 配置hadoop-1.2.1出现localhost: Error: JAVA_HOME is not set.

    配置hadoop-1.2.1出现localhost: Error: JAVA_HOME is not set. 具体为: hadoop@dy-virtual-machine:~/hadoop-1.2. ...

  8. js prototype

    1 原型法设计模式 在.Net中可以使用clone()来实现原型法 原型法的主要思想是,现在有1个类A,我想要创建一个类B,这个类是以A为原型的,并且能进行扩展.我们称B的原型为A. 2 javasc ...

  9. 微博feed系统的推(push)模式和拉(pull)模式和时间分区拉模式架构探讨

    sns系统,微博系统都应用到了feed(每条微博或者sns里的新鲜事等我们称作feed)系统,不管是twitter.com或者国内的新浪微博,人人网等,在各种技术社区,技术大会上都在分享自己的feed ...

  10. git branch -D 大写的D 删除分支

    今天删除本地分支 git branch -d XXX 提示:  the branch  XXX is not fully merged 原因:XXX分支有没有合并到当前分支的内容 解决方法:使用大写的 ...