资源简介
简单的做了一个C#开发巴斯勒SDK,主要就是单次取图,实时拍摄,参数设置,图像比例设置等
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Basler.Pylon;
using System.Diagnostics;
using System.Drawing.Imaging;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private Camera camera = null;
private PixelDataConverter converter = new PixelDataConverter();
private Stopwatch stopWatch = new Stopwatch();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender EventArgs e)
{
UpdateDeviceList();
button1.Enabled = true;
button2.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
button6.Enabled = false;
button7.Enabled = false;
pictureBox1.MouseWheel += new MouseEventHandler(pictureBox1_MouseWheel);
}
private void UpdateDeviceList() //相机列表加载
{
try
{
// Ask the camera finder for a list of camera devices.
List allCameras = CameraFinder.Enumerate();
ListView.ListViewItemCollection items = deviceListView.Items;
// Loop over all cameras found.
foreach (ICameraInfo cameraInfo in allCameras)
{
// Loop over all cameras in the list of cameras.
bool newitem = true;
foreach (ListViewItem item in items)
{
ICameraInfo tag = item.Tag as ICameraInfo;
// Is the camera found already in the list of cameras?
if (tag[CameraInfoKey.FullName] == cameraInfo[CameraInfoKey.FullName])
{
tag = cameraInfo;
newitem = false;
break;
}
}
// If the camera is not in the list add it to the list.
if (newitem)
{
// Create the item to display.
ListViewItem item = new ListViewItem(cameraInfo[CameraInfoKey.FriendlyName]);
// Create the tool tip text.
string toolTipText = ““;
foreach (KeyValuePair kvp in cameraInfo)
{
toolTipText += kvp.Key + “: “ + kvp.Value + “\n“;
}
item.ToolTipText = toolTipText;
// Store the camera info in the displayed item.
item.Tag = cameraInfo;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-04 12:20 巴斯勒sdk\
目录 0 2019-01-04 12:20 巴斯勒sdk\WindowsFormsApplication1\
目录 0 2019-01-10 10:06 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\
文件 1316 2019-01-10 09:21 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1.sln
文件 44544 2019-01-10 16:36 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1.v11.suo
文件 187 2019-01-04 12:20 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\App.config
目录 0 2019-01-10 09:21 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\
目录 0 2019-01-07 15:48 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\
目录 0 2019-01-04 15:53 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\
目录 0 2019-01-04 15:53 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\Basler.Pylon\
目录 0 2019-01-04 15:53 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\Basler.Pylon\x64\
文件 960968 2017-07-19 13:57 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\Basler.Pylon\x64\Basler.Pylon.dll
文件 2181852 2017-07-19 13:36 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\Basler.Pylon\x64\Basler.Pylon.xm
目录 0 2019-01-04 15:53 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\Basler.Pylon\x86\
文件 942024 2017-07-19 13:57 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\Basler.Pylon\x86\Basler.Pylon.dll
文件 2181852 2017-07-19 13:35 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\Basler.Pylon\x86\Basler.Pylon.xm
目录 0 2019-01-04 15:53 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\PylonC.Net\
文件 67016 2017-07-19 13:57 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\PylonC.Net\PylonC.NET.dll
文件 213233 2017-07-19 13:03 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Assemblies\PylonC.Net\PylonC.NET.xm
文件 942024 2017-07-19 13:57 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Basler.Pylon.dll
文件 2181852 2017-07-19 13:35 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Basler.Pylon.xm
文件 180 2019-01-07 10:05 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\PylonLiveViewControl.EnumerationComboBoxUserControl.resources
文件 180 2019-01-07 10:05 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\PylonLiveViewControl.FloatSliderUserControl.resources
文件 180 2019-01-07 10:05 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\PylonLiveViewControl.IntSliderUserControl.resources
文件 22016 2019-01-09 17:35 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 187 2019-01-04 12:20 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
文件 40448 2019-01-09 17:35 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 22984 2019-01-10 09:17 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 187 2019-01-04 12:20 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config
文件 490 2018-04-12 07:35 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
目录 0 2019-01-10 09:21 巴斯勒sdk\WindowsFormsApplication1\WindowsFormsApplication1\bin\Release\
............此处省略52个文件信息
相关资源
- C#经典会员管理项目完整源码(包含完
- C#中PDF文件转WORD文件2019
- 中控考勤机开发文件 +sdk+文档+各种(
- C#高级编程第10版英文原版
- c#入门经典 第七版 中文版 非扫描版
- .netc#新手菜鸟mvc5的仓库管理系统 so
- C# NPOI生成word插入图片和表格
- C#程序设计基础C#程序设计及应用教程
- 深入.NET平台和C#编程
- .net 美萍超市管理系统源码C#
- WinForm GeckoFx33 Demo JS与C#互交 窗口浏览
- 《ASP.NET程序设计项目教程》周虎,王
- 计算机图形学 三维模型处理算法初步
- C# KTV 点歌系统,C#项目源码带数据库
- C#实验--A.1 视频动态绘制练习.
- c#实现动态规划法——求解矩阵连乘问
- c#winform中完美代替WebBrowser最新的控件
- C#高级编程第9版:C#5.0 & .NET 4.5.1 par
- Illustrated C# 2010 C# 4.0图解教程
- C# WINFORM框架源碼
- C# WinForm实践开发教程清晰版
- 3D打印机上位机源码Reprap Host 是C#写的
- C#设计模式+源码JamesW.Cooper.zip
- C#程序开发范例宝典(第3版).(配套
- C#写的年会抽奖软件包含源代码.zip
- 大型ERP C#源码
- asp.net完整项目带数据库
- 清大出版社 段德亮 《C#课程设计案例
- C#人事管理系统/人力资源管理系统
- C# 7 and .NET Core: Modern Cross-Platform Deve
评论
共有 条评论