C# + Basler相机采集图像DLL
文章转自 https://blog.csdn.net/qq_39930578/article/details/87897257 在此做个备份,代码如下: using Basler.Pylon; using System; using System.Drawing; using System.Drawing.Imaging; namespace CameraForms { public class baslerCamcs { //相机连接的个数 public int CameraNumber = CameraFinder.Enumerate().Count; //委托+事件 = 回调函数,用于传递相机抓取的图像 public delegate void CameraImage(Bitmap bmp); public event CameraImage CameraImageEvent; //放出一个Camera Camera camera; //basler里用于将相机采集的图像转换成位图 PixelDataConverter pxConvert = new PixelDataConverter(); //控制相机采集图像的过程 bool GrabOver = false; //相机初始化 public void CameraInit() { camera = new Camera(