Commit 2ef1b3ce LN

eyem可选择是否默认打钩

1 个父辈 32b2ae2c
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
this.txtParamPath = new System.Windows.Forms.TextBox(); this.txtParamPath = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.btnScanTest = new System.Windows.Forms.Button(); this.btnScanTest = new System.Windows.Forms.Button();
this.chbZxing = new System.Windows.Forms.CheckBox(); this.chbEyem = new System.Windows.Forms.CheckBox();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
...@@ -317,18 +317,18 @@ ...@@ -317,18 +317,18 @@
this.btnScanTest.Visible = false; this.btnScanTest.Visible = false;
this.btnScanTest.Click += new System.EventHandler(this.btnScanTest_Click); this.btnScanTest.Click += new System.EventHandler(this.btnScanTest_Click);
// //
// chbZxing // chbEyem
// //
this.chbZxing.AutoSize = true; this.chbEyem.AutoSize = true;
this.chbZxing.Checked = true; this.chbEyem.Checked = true;
this.chbZxing.CheckState = System.Windows.Forms.CheckState.Checked; this.chbEyem.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbZxing.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbEyem.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbZxing.Location = new System.Drawing.Point(765, 16); this.chbEyem.Location = new System.Drawing.Point(765, 16);
this.chbZxing.Name = "chbZxing"; this.chbEyem.Name = "chbEyem";
this.chbZxing.Size = new System.Drawing.Size(103, 21); this.chbEyem.Size = new System.Drawing.Size(103, 21);
this.chbZxing.TabIndex = 31; this.chbEyem.TabIndex = 31;
this.chbZxing.Text = "EyemDecode"; this.chbEyem.Text = "EyemDecode";
this.chbZxing.UseVisualStyleBackColor = true; this.chbEyem.UseVisualStyleBackColor = true;
// //
// label5 // label5
// //
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1375, 729); this.ClientSize = new System.Drawing.Size(1375, 729);
this.Controls.Add(this.label5); this.Controls.Add(this.label5);
this.Controls.Add(this.chbZxing); this.Controls.Add(this.chbEyem);
this.Controls.Add(this.btnScanTest); this.Controls.Add(this.btnScanTest);
this.Controls.Add(this.txtParamPath); this.Controls.Add(this.txtParamPath);
this.Controls.Add(this.label4); this.Controls.Add(this.label4);
...@@ -404,7 +404,7 @@ ...@@ -404,7 +404,7 @@
private System.Windows.Forms.TextBox txtParamPath; private System.Windows.Forms.TextBox txtParamPath;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnScanTest; private System.Windows.Forms.Button btnScanTest;
private System.Windows.Forms.CheckBox chbZxing; private System.Windows.Forms.CheckBox chbEyem;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
} }
} }
......
...@@ -25,9 +25,10 @@ namespace CodeLibrary ...@@ -25,9 +25,10 @@ namespace CodeLibrary
// private List<string> baslerNameList = new List<string>(); // private List<string> baslerNameList = new List<string>();
// private List<string> hikNameList = new List<string>(); // private List<string> hikNameList = new List<string>();
public FrmCodeDecode() public FrmCodeDecode(bool eyemSel = true)
{ {
InitializeComponent(); InitializeComponent();
chbEyem.Checked = eyemSel;
} }
private string selCamera = CodeResourceControl.GetString(CodeResourceControl.selCamera, "请先选择相机"); private string selCamera = CodeResourceControl.GetString(CodeResourceControl.selCamera, "请先选择相机");
private string selImage = CodeResourceControl.GetString(CodeResourceControl.selImage, "请先选择图片"); private string selImage = CodeResourceControl.GetString(CodeResourceControl.selImage, "请先选择图片");
...@@ -208,7 +209,7 @@ namespace CodeLibrary ...@@ -208,7 +209,7 @@ namespace CodeLibrary
stopwatch.Restart(); stopwatch.Restart();
HDCodeHelper.HalconWindow = this.hWindowControl1.HalconWindow; HDCodeHelper.HalconWindow = this.hWindowControl1.HalconWindow;
if (chbZxing.Checked) if (chbEyem.Checked)
{ {
if (pictureBox1.Image == null) if (pictureBox1.Image == null)
{ {
...@@ -265,7 +266,7 @@ namespace CodeLibrary ...@@ -265,7 +266,7 @@ namespace CodeLibrary
{ {
codeParamPath = ""; codeParamPath = "";
} }
if (chbZxing.Checked) if (chbEyem.Checked)
{ {
if (pictureBox1.Image == null) if (pictureBox1.Image == null)
{ {
...@@ -351,7 +352,7 @@ namespace CodeLibrary ...@@ -351,7 +352,7 @@ namespace CodeLibrary
{ {
try try
{ {
if (!chbZxing.Checked) if (!chbEyem.Checked)
{ {
HObject bitmap = GetCameraBitmap(out Bitmap b); HObject bitmap = GetCameraBitmap(out Bitmap b);
if (bitmap != null) if (bitmap != null)
......
...@@ -320,12 +320,7 @@ namespace CodeLibrary ...@@ -320,12 +320,7 @@ namespace CodeLibrary
HOperatorSet.ReadImage(out ho_Image, filePath); HOperatorSet.ReadImage(out ho_Image, filePath);
return DecodeBarCode(ho_Image); return DecodeBarCode(ho_Image);
} }
//public static List<CodeInfo> DecodeBarCode(Bitmap bitmap)
//{
// HObject ho_image;
// Bitmap2HObjectBpp24(bitmap,out ho_image);
// return DecodeBarCode(ho_image);
//}
public static List<CodeInfo> DecodeBarCode(HObject ho_Image) public static List<CodeInfo> DecodeBarCode(HObject ho_Image)
{ {
...@@ -341,6 +336,12 @@ namespace CodeLibrary ...@@ -341,6 +336,12 @@ namespace CodeLibrary
HTuple hv_Row1 = null; HTuple hv_Row1 = null;
HTuple hv_Column = null; HTuple hv_Column = null;
HTuple hv_Orientation = null; HTuple hv_Orientation = null;
HObject ExpTmpOutVar_0;
HOperatorSet.ZoomImageFactor(ho_Image, out ExpTmpOutVar_0, 2, 2, "bilinear");
ho_Image.Dispose();
ho_Image = ExpTmpOutVar_0;
HOperatorSet.Rgb1ToGray(ho_Image, out ho_GrayImage); HOperatorSet.Rgb1ToGray(ho_Image, out ho_GrayImage);
HOperatorSet.GenEmptyObj(out ho_SymbolRegions); HOperatorSet.GenEmptyObj(out ho_SymbolRegions);
ho_SymbolRegions.Dispose(); ho_SymbolRegions.Dispose();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!