资源简介
c#64位basler相机SDK,与Basler工程师确认,可通用USB3.0和以太网口,双相机Demo,增加掉线重连功能。
代码片段和文件信息
/*
* Target:此Demo是基于Pylon5版本的开发库basler.pylon.dll所写,支持黑白/彩色的Gige/USB3.0相机。
* Author:Jogan (MVLZ)
* Update:2017.12.27
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Basler.Pylon;
using HalconDotNet;
namespace PylonLiveViewer
{
public class BaslerCam
{
private Camera camera = null;
private PixelDataConverter converter = new PixelDataConverter();
private String strUserID = null;
public long imageWidth = 0; // 图像宽
public long imageHeight = 0; // 图像高
public long minExposureTime = 0; // 最小曝光时间
public long maxExposureTime = 0; // 最大曝光时间
public long minGain = 0; // 最小增益
public long maxGain = 0; // 最大增益
private long grabTime = 0; // 采集图像时间
private Hobject hPylonImage = null;
private IntPtr latestframeAddress = IntPtr.Zero;
private Stopwatch stopWatch = new Stopwatch();
///
/// 计算采集图像时间自定义委托
///
/// 采集图像时间
public delegate void delegateComputeGrabTime(long time);
///
/// 计算采集图像时间委托事件
///
public event delegateComputeGrabTime eventComputeGrabTime;
///
/// 图像处理自定义委托
///
/// halcon图像变量
public delegate void delegateProcessHImage(Hobject hImage);
///
/// 图像处理委托事件
///
public event delegateProcessHImage eventProcessImage;
///
/// if >= Sfnc2_0_0说明是USB3的相机
///
static Version Sfnc2_0_0 = new Version(2 0 0);
/****************** 实例化相机 ******************/
///
/// 实例化第一个找到的相机
///
public BaslerCam()
{
try
{
camera = new Camera();
}
catch (Exception e)
{
ShowException(e);
}
}
///
/// 根据相机序列号实例化相机
///
///
//public BaslerCam(string SN)
//{
// camera = new Camera(SN);
//}
///
/// 根据相机UserID实例化相机
///
///
public BaslerCam(string UserID)
{
try
{
strUserID = UserID; //掉线重连用
// 枚举相机列表
List allCameraInfos = CameraFinder.Enumerate();
foreach (ICameraInfo cameraInfo in allCameraInfos)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-06-21 17:23 C#_x64_Pylon5(增加掉线重连)\
目录 0 2017-12-27 17:38 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\
目录 0 2018-06-21 17:23 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\
目录 0 2018-06-22 11:48 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\
文件 1241 2017-08-12 10:04 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer.sln
文件 38912 2017-12-27 17:41 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer.suo
文件 74240 2018-06-22 11:48 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer.v12.suo
文件 144 2017-11-24 14:03 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\app.config
文件 32038 2016-07-20 14:59 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\Basler.ico
文件 33722 2017-12-27 17:41 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\BaslerCam.cs
目录 0 2017-08-12 10:04 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\
目录 0 2017-08-12 09:29 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\Debug\
文件 11600 2017-08-12 09:29 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\Debug\PylonLiveViewer.vshost.exe
文件 490 2017-03-19 05:00 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\Debug\PylonLiveViewer.vshost.exe.manifest
目录 0 2017-08-12 10:04 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\Release\
目录 0 2017-08-12 10:13 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\
目录 0 2017-12-27 16:52 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\
文件 1271352 2014-11-15 02:27 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\halcondotnet.dll
文件 3054227 2010-09-15 01:04 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\halcondotnet.xm
文件 68096 2018-06-22 11:40 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\PylonLiveViewer.exe
文件 144 2017-11-24 14:03 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\PylonLiveViewer.exe.config
文件 69120 2018-06-22 11:40 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\PylonLiveViewer.pdb
文件 24216 2018-06-22 11:41 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\PylonLiveViewer.vshost.exe
文件 144 2017-11-24 14:03 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\PylonLiveViewer.vshost.exe.config
文件 490 2018-04-12 07:35 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Debug\PylonLiveViewer.vshost.exe.manifest
目录 0 2017-08-15 20:17 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Release\
文件 850168 2010-09-23 17:42 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Release\halcondotnet.dll
文件 3054227 2010-09-15 01:04 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Release\halcondotnet.xm
文件 32256 2017-08-15 20:17 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Release\PylonLiveViewer.exe
文件 48640 2017-08-15 20:17 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Release\PylonLiveViewer.pdb
文件 11592 2017-08-16 19:56 C#_x64_Pylon5(增加掉线重连)\C#_x64_Pylon5_Halcon10_VS2010_2CCD_V3.5.0\PylonLiveViewer\PylonLiveViewer\bin\x64\Release\PylonLiveViewer.vshost.exe
............此处省略45个文件信息
相关资源
- ASP.NET C#超市进销存管理系统 代码 论
- C#串口助手源码169670
- 毕业设计《网上商城》程序源码c#.n
- 教室及会议室预约系统C#小程序,课堂
- C#实现电视墙界面演示
- 最为完整的arcengine基于C#的程序
- C#数据库编程大全,包括22个经典
- [原创]实现用C#开发K3插件教程
- C#50个经典小程序(新手必备)
- (源代码)C#作为上位机,控制51单片
- 人事薪资系统(C# WINFORM)
- 用C#编写的LL1分析器
- C#高固运动控制卡demo源码.rar
- OPC UA服务器/客户端开发工具284826
- C# 图片添加水印系统
- 一个简单的 MVC 电商网站-BookStore
- 虹软人脸识别ArcFace 2.1 (C# 修改官方
- 开源仿photoshop c#源码paint.net
- C#经典编程220例 免积分 教学光盘 C#入
- C# PCM音乐流播放
- 微信ipad协议C#winfrom版 功能可用!扫码
- AE+C#三维显示
- KTV点歌系统C#源码
- C#读取mat文件csmatio.zip
- C#项目合集9个项目
- C# MVC 支付宝商户转账即时到账源码个
- C#高级编程第10版中文PDF非扫描版带目
- C#高级编程第11版
- C#商城源码
- C#高级编程第11版(Professional C# 7 and
评论
共有 条评论