mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-04-04 09:06:35 +08:00
1、添加手眼标定工具,可选择4点或者9点标定,输出标定矩阵
2、修正Halcon引擎运行工具 3、添加相机SDK工具,但需完善 4、HalconTool取图工具增加选择文件夹功能 5、实现Job窗体可添加多个流程
This commit is contained in:
274
SDKCameraTool/BaslerCamera.cs
Normal file
274
SDKCameraTool/BaslerCamera.cs
Normal file
@@ -0,0 +1,274 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SDKCameraTool
|
||||
{
|
||||
public class BaslerCamera : ICamera
|
||||
{
|
||||
public bool bGammaEnable
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public Bitmap bmpImage
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int cameraID
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string cameraName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public CamereaCompanyType CompanyType
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string CxpFilePath
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float fExpTime
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float fGain
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public float iGamma
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool isFlowAcq
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsNeedCalibration
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int OffsetX
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int OffsetY
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public string sSerialNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int TriggerCount
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int TriggerDelay
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public TriggerMode triggerMode
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public TriggerSouce triggerSource
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler<EventImageTrigger> ImageTrigger;
|
||||
|
||||
public int CloseCam()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public int OpenCam(CaptureMode captureMode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public int Snap()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
134
SDKCameraTool/FormSDKCameraTool.Designer.cs
generated
Normal file
134
SDKCameraTool/FormSDKCameraTool.Designer.cs
generated
Normal file
@@ -0,0 +1,134 @@
|
||||
namespace SDKCameraTool
|
||||
{
|
||||
partial class FormSDKCameraTool
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormSDKCameraTool));
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.tsbtRunTool = new System.Windows.Forms.ToolStripButton();
|
||||
this.statusStrip = new System.Windows.Forms.StatusStrip();
|
||||
this.lb_RunStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lb_RunTime = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.uiSplitContainer1 = new Sunny.UI.UISplitContainer();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.statusStrip.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.uiSplitContainer1)).BeginInit();
|
||||
this.uiSplitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(25, 25);
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbtRunTool});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(1092, 32);
|
||||
this.toolStrip1.TabIndex = 5;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// tsbtRunTool
|
||||
//
|
||||
this.tsbtRunTool.Image = ((System.Drawing.Image)(resources.GetObject("tsbtRunTool.Image")));
|
||||
this.tsbtRunTool.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.tsbtRunTool.Name = "tsbtRunTool";
|
||||
this.tsbtRunTool.Size = new System.Drawing.Size(85, 29);
|
||||
this.tsbtRunTool.Text = "运行工具";
|
||||
//
|
||||
// statusStrip
|
||||
//
|
||||
this.statusStrip.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.lb_RunStatus,
|
||||
this.toolStripStatusLabel1,
|
||||
this.lb_RunTime});
|
||||
this.statusStrip.Location = new System.Drawing.Point(0, 618);
|
||||
this.statusStrip.Name = "statusStrip";
|
||||
this.statusStrip.Size = new System.Drawing.Size(1092, 22);
|
||||
this.statusStrip.TabIndex = 4;
|
||||
//
|
||||
// lb_RunStatus
|
||||
//
|
||||
this.lb_RunStatus.Name = "lb_RunStatus";
|
||||
this.lb_RunStatus.Size = new System.Drawing.Size(0, 17);
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(16, 17);
|
||||
this.toolStripStatusLabel1.Text = " ";
|
||||
//
|
||||
// lb_RunTime
|
||||
//
|
||||
this.lb_RunTime.Name = "lb_RunTime";
|
||||
this.lb_RunTime.Size = new System.Drawing.Size(0, 17);
|
||||
//
|
||||
// uiSplitContainer1
|
||||
//
|
||||
this.uiSplitContainer1.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.uiSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.uiSplitContainer1.Location = new System.Drawing.Point(0, 32);
|
||||
this.uiSplitContainer1.Name = "uiSplitContainer1";
|
||||
this.uiSplitContainer1.Size = new System.Drawing.Size(1092, 586);
|
||||
this.uiSplitContainer1.SplitterDistance = 632;
|
||||
this.uiSplitContainer1.SplitterWidth = 11;
|
||||
this.uiSplitContainer1.TabIndex = 6;
|
||||
//
|
||||
// FormSDKCameraTool
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1092, 640);
|
||||
this.Controls.Add(this.uiSplitContainer1);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this.statusStrip);
|
||||
this.Name = "FormSDKCameraTool";
|
||||
this.Text = "FormSDKCameraTool";
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.statusStrip.ResumeLayout(false);
|
||||
this.statusStrip.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.uiSplitContainer1)).EndInit();
|
||||
this.uiSplitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripButton tsbtRunTool;
|
||||
private System.Windows.Forms.StatusStrip statusStrip;
|
||||
private System.Windows.Forms.ToolStripStatusLabel lb_RunStatus;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel lb_RunTime;
|
||||
private Sunny.UI.UISplitContainer uiSplitContainer1;
|
||||
}
|
||||
}
|
||||
20
SDKCameraTool/FormSDKCameraTool.cs
Normal file
20
SDKCameraTool/FormSDKCameraTool.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
|
||||
namespace SDKCameraTool
|
||||
{
|
||||
public partial class FormSDKCameraTool : Form
|
||||
{
|
||||
public FormSDKCameraTool()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
199
SDKCameraTool/FormSDKCameraTool.resx
Normal file
199
SDKCameraTool/FormSDKCameraTool.resx
Normal file
@@ -0,0 +1,199 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>225, 19</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="tsbtRunTool.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KG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uKgBuOC0ffw/BKpkGlsJCPLMQpjZxTOd0Rl8gAJPX0QRPZ1xzvAWiFprMJrlE1oGIgtAl
|
||||
yMPZJljIwHP4uynw3+LPNSyANHHNvddt3SP67CZqE/KS/J3xTaGNlS4yZkTuiLeKrm1Xx6Sd6gi0XfUI
|
||||
YYTFCNqp/kChlOO0aODzlMGQoPWyYcgYWLqmMHyCQtnHWRisMQYBhCKD3vZmYxPs/wwaoUDYlcaONJeI
|
||||
3zlnC+5+E5+A9ftRi/ogih+P3yEKZgtiFTjrBHuRCiYvhChooQg1kFmm4r5vwcyCmO0TRUEUAQQT6pbG
|
||||
BUNBEE0AewIXoomncdNBW4KhfsDJ33i8HtdCQRDN4104H89u4KEqPImIo+3vR9ovj7PHYP81H4UPROBP
|
||||
n4H40MZzWKY2esaEIAiCIAiCIKrhy5f/A2/46JDXUARZAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>335, 19</value>
|
||||
</metadata>
|
||||
</root>
|
||||
174
SDKCameraTool/ICamera.cs
Normal file
174
SDKCameraTool/ICamera.cs
Normal file
@@ -0,0 +1,174 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SDKCameraTool
|
||||
{
|
||||
public interface ICamera
|
||||
{
|
||||
/// <summary>
|
||||
/// CaemraID
|
||||
/// </summary>
|
||||
[CategoryAttribute("CaemraID")]
|
||||
int cameraID { get; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
CamereaCompanyType CompanyType { get; }
|
||||
/// <summary>
|
||||
/// 相机名称
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机名称")]
|
||||
string cameraName { get; set; }
|
||||
/// <summary>
|
||||
/// bmp图像
|
||||
/// </summary>
|
||||
[CategoryAttribute("获取的图像")]
|
||||
Bitmap bmpImage { get; }
|
||||
/// <summary>
|
||||
/// 曝光值
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机曝光")]
|
||||
float fExpTime { get; set; }
|
||||
/// <summary>
|
||||
/// 触发方式
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机触发模式")]
|
||||
TriggerMode triggerMode { get; set; }
|
||||
/// <summary>
|
||||
/// 触发源
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机触发源")]
|
||||
TriggerSouce triggerSource { get; set; }
|
||||
/// <summary>
|
||||
/// 相机序列号,相机调用唯一标识
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机序列号")]
|
||||
string sSerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 增益
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机增益")]
|
||||
float fGain { get; set; }
|
||||
/// <summary>
|
||||
/// 伽马
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机伽马值")]
|
||||
float iGamma { get; set; }
|
||||
/// <summary>
|
||||
/// 伽马使能
|
||||
/// </summary>
|
||||
[CategoryAttribute("相机伽马使能")]
|
||||
bool bGammaEnable { get; set; }
|
||||
/// <summary>
|
||||
/// 感兴趣区域宽度
|
||||
/// </summary>
|
||||
[CategoryAttribute("ROI宽")]
|
||||
int Width { get; set; }
|
||||
/// <summary>
|
||||
/// 感兴趣区域高度
|
||||
/// </summary>
|
||||
[CategoryAttribute("ROI高")]
|
||||
int Height { get; set; }
|
||||
/// <summary>
|
||||
/// X偏移
|
||||
/// </summary>
|
||||
[CategoryAttribute("X偏移")]
|
||||
int OffsetX { get; set; }
|
||||
/// <summary>
|
||||
/// Y偏移
|
||||
/// </summary>
|
||||
[CategoryAttribute("Y偏移")]
|
||||
int OffsetY { get; set; }
|
||||
/// <summary>
|
||||
/// 触发拍照延时
|
||||
/// </summary>
|
||||
int TriggerDelay { get; set; }
|
||||
/// <summary>
|
||||
/// 是否作为飞拍使用
|
||||
/// </summary>
|
||||
bool isFlowAcq { get; set; }
|
||||
/// <summary>
|
||||
/// 该相机触发次数
|
||||
/// </summary>
|
||||
int TriggerCount { get; set; }
|
||||
/// <summary>
|
||||
/// 该相机出来的图像是否需要经过标定
|
||||
/// </summary>
|
||||
bool IsNeedCalibration { get; set; }
|
||||
string CxpFilePath { get; set; }
|
||||
/// <summary>
|
||||
/// 打开相机
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
int OpenCam(CaptureMode captureMode);
|
||||
/// <summary>
|
||||
/// 关闭相机
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
int CloseCam();
|
||||
/// <summary>
|
||||
/// 取图
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
int Snap();
|
||||
/// <summary>
|
||||
/// 被动触发事件
|
||||
/// </summary>
|
||||
event EventHandler<EventImageTrigger> ImageTrigger;
|
||||
}
|
||||
|
||||
public enum CamereaCompanyType
|
||||
{
|
||||
HIKVision,
|
||||
HIKVision_CXP,
|
||||
Ajhua,
|
||||
Basler,
|
||||
FLIR,
|
||||
File,
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EventImageTrigger : EventArgs
|
||||
{
|
||||
public string cameraName { get; set; }
|
||||
public Bitmap image { get; set; }
|
||||
public int TriggerCount { get; set; }
|
||||
}
|
||||
public class EventIntPtrImageTrigger : EventArgs
|
||||
{
|
||||
public string cameraName { get; set; }
|
||||
public IntPtr pImage { get; set; }
|
||||
public int imageWidth { get; set; }
|
||||
public int imageHeight { get; set; }
|
||||
}
|
||||
public enum TriggerMode
|
||||
{
|
||||
Off = 0,
|
||||
On
|
||||
}
|
||||
|
||||
public enum TriggerSouce
|
||||
{
|
||||
HIKLine0 = 0,
|
||||
HIKSoftWare = 1,
|
||||
FLIRLine0 = 2,
|
||||
FLIRSoftWare = 3,
|
||||
SoftWareHIK = 7
|
||||
}
|
||||
public enum CaptureMode
|
||||
{
|
||||
Positive,
|
||||
CallBack
|
||||
}
|
||||
/// <summary>
|
||||
/// 每次需从相机读取的参数
|
||||
/// </summary>
|
||||
public class CameraInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
36
SDKCameraTool/Properties/AssemblyInfo.cs
Normal file
36
SDKCameraTool/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("SDKCameraTool")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SDKCameraTool")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("1c61f57d-1a36-4a98-b7dd-a65f2dbbe468")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
SDKCameraTool/SDKCameraTool.csproj
Normal file
71
SDKCameraTool/SDKCameraTool.csproj
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1C61F57D-1A36-4A98-B7DD-A65F2DBBE468}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SDKCameraTool</RootNamespace>
|
||||
<AssemblyName>SDKCameraTool</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="SunnyUI">
|
||||
<HintPath>..\VisionEdit\bin\Debug\ThirdLib\SunnyUI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BaslerCamera.cs" />
|
||||
<Compile Include="FormSDKCameraTool.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FormSDKCameraTool.Designer.cs">
|
||||
<DependentUpon>FormSDKCameraTool.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ICamera.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FormSDKCameraTool.resx">
|
||||
<DependentUpon>FormSDKCameraTool.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Reference in New Issue
Block a user