Commit eaf73262 LN

点料区分大小料

1 个父辈 7eac7a5b
......@@ -81,6 +81,8 @@
this.lblThisSta = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.fileSystemWatcher1 = new System.IO.FileSystemWatcher();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.panel1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox3.SuspendLayout();
......@@ -585,6 +587,8 @@
//
// groupBox8
//
this.groupBox8.Controls.Add(this.radioButton2);
this.groupBox8.Controls.Add(this.radioButton1);
this.groupBox8.Controls.Add(this.btnSelImage);
this.groupBox8.Controls.Add(this.txtImage);
this.groupBox8.Controls.Add(this.numWSize);
......@@ -626,7 +630,7 @@
// numWSize
//
this.numWSize.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numWSize.Location = new System.Drawing.Point(88, 115);
this.numWSize.Location = new System.Drawing.Point(88, 96);
this.numWSize.Maximum = new decimal(new int[] {
1000,
0,
......@@ -644,7 +648,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(14, 120);
this.label3.Location = new System.Drawing.Point(14, 101);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 17);
this.label3.TabIndex = 292;
......@@ -653,7 +657,7 @@
// numTh
//
this.numTh.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numTh.Location = new System.Drawing.Point(88, 67);
this.numTh.Location = new System.Drawing.Point(88, 61);
this.numTh.Name = "numTh";
this.numTh.Size = new System.Drawing.Size(82, 26);
this.numTh.TabIndex = 291;
......@@ -696,7 +700,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(38, 72);
this.label1.Location = new System.Drawing.Point(38, 66);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17);
this.label1.TabIndex = 286;
......@@ -894,6 +898,27 @@
this.fileSystemWatcher1.EnableRaisingEvents = true;
this.fileSystemWatcher1.SynchronizingObject = this;
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Checked = true;
this.radioButton1.Location = new System.Drawing.Point(26, 134);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(62, 21);
this.radioButton1.TabIndex = 297;
this.radioButton1.Text = "小料盘";
this.radioButton1.UseVisualStyleBackColor = true;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(108, 134);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(62, 21);
this.radioButton2.TabIndex = 298;
this.radioButton2.Text = "大料盘";
this.radioButton2.UseVisualStyleBackColor = true;
//
// FrmXRay
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -999,6 +1024,8 @@
private System.Windows.Forms.TextBox txtImage;
private System.Windows.Forms.Button btnSelImage;
private System.IO.FileSystemWatcher fileSystemWatcher1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
}
}
......@@ -421,7 +421,6 @@ namespace OnlineStore.AutoCountClient
private void btnWorkTest_Click(object sender, EventArgs e)
{
LogUtil.info(equipBean.Name + "用户点击 点料测试 ");
btnWorkTest.Enabled = false;
try
{
string filePath = txtImage.Text.Trim();
......@@ -430,14 +429,21 @@ namespace OnlineStore.AutoCountClient
MessageBox.Show("请先选择正确的图片");
return;
}
btnWorkTest.Enabled = false;
txtResult.Text = "点料中...";
int th = (int)numTh.Value;
int wsize = (int)numWSize.Value;
int outCount = 0;
// equipBean.countImage.GetCount(th, out outCount);
int n = equipBean.carerayImage.GetLocalCount(filePath, th, wsize, out outCount, out Asa.API.EyemImage tpDstImg);
int n = 0;
if (radioButton1.Checked)
{
n = equipBean.carerayImage.GetLocalCount(filePath, th, wsize, out outCount, out Asa.API.EyemImage tpDstImg);
}
else
{
n = equipBean.carerayImage.GetLocalCountHuge(filePath, th, wsize, out outCount, out Asa.API.EyemImage tpDstImg);
}
txtResult.Text = outCount.ToString();
LogUtil.info(equipBean.Name + "用户点击 点料测试【" + filePath + "】【" + th + "】【" + wsize + "】 结果[" + n + "]:" + outCount);
}
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.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>
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AssemblyLineSystem</RootNamespace>
<AssemblyName>AssemblyLineSystem</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......
......@@ -326,7 +326,7 @@ namespace OnlineStore.DeviceLibrary
private string lastFileName = "";
private int lastTh = 0;
private int lastWSize = 0;
private int lastWSize = 0;
private void XW15_GetResult()
{
if (IOValue(IO_Type.X_Lock_On).Equals(IO_VALUE.LOW))
......@@ -345,10 +345,20 @@ namespace OnlineStore.DeviceLibrary
//bool result = countImage.GetCount(lastTh, out count);
//WorkLog("点料:获取点料结果[" + lastTh + "]=【" + count + "】,result=" + result + ",保存并上传结果");
WorkLog("点料:开始调用 countImage.GetCount ");
string fileP = path1_tif + @"\" + lastFileName;
int n = carerayImage.GetLocalCount(fileP, lastTh, lastWSize, out count, out Asa.API.EyemImage tpDstImg);
WorkLog("点料:获取点料结果 【" + count + "】【"+lastTh+"】【"+lastWSize+"】,n =" + n + ",保存并上传结果");
int n = 0;
if (Work_ReelInfo.PlateW.Equals(7))
{
WorkLog("点料:开始调用 carerayImage.GetLocalCount ");
n = carerayImage.GetLocalCount(fileP, lastTh, lastWSize, out count, out Asa.API.EyemImage tpDstImg);
}
else
{
WorkLog("点料:开始调用 carerayImage.GetLocalCountHuge ");
n = carerayImage.GetLocalCountHuge(fileP, lastTh, lastWSize, out count, out Asa.API.EyemImage tpDstImg);
}
WorkLog("点料:获取点料结果 【" + count + "】【" + lastTh + "】【" + lastWSize + "】,n =" + n + ",保存并上传结果");
if (Work_ReelInfo.WareCount <= 0)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!