|
|
@@ -119,9 +119,6 @@ namespace MvvmScaffoldFrame48.DLL.ImageAlgorithm
|
|
|
if ((item.LastSeenLine - item.StartLine) > shuLiConfig.MAX_Idetify_Height)
|
|
|
{
|
|
|
item.StateCode = 7;
|
|
|
- //FaultLog.RecordLogMessage("ShuLiClass-ProcessLine:非颗粒,视野异常", 3);
|
|
|
- //TxtLog.log(string.Format("ShuLiClass-ProcessLine:非颗粒,视野异常"), 6);
|
|
|
- //Console.WriteLine("ShuLiClass-ProcessLine:非颗粒,视野异常");
|
|
|
}
|
|
|
else if (shuLiConfig.PandingCode != -1)
|
|
|
{
|
|
|
@@ -136,35 +133,25 @@ namespace MvvmScaffoldFrame48.DLL.ImageAlgorithm
|
|
|
&& (shuLiConfig.PandingCode == 2 || shuLiConfig.PandingCode == 1))
|
|
|
{
|
|
|
item.StateCode = 5;
|
|
|
- //TxtLog.log(string.Format("颗粒编号{0}:面积过小", item.Num));
|
|
|
- //Console.WriteLine("颗粒编号{0}:面积过小", item.Num);
|
|
|
}
|
|
|
else if (item.Area > shuLiConfig.MaxArea
|
|
|
&& (shuLiConfig.PandingCode == 2 || shuLiConfig.PandingCode == 1))
|
|
|
{
|
|
|
item.StateCode = 6;
|
|
|
- //TxtLog.log(string.Format("颗粒编号{0}:面积过大", item.Num));
|
|
|
- //Console.WriteLine("颗粒编号{0}:面积过大", item.Num);
|
|
|
}
|
|
|
else if (item.MaxLength < shuLiConfig.MIN_Object_LENGTH
|
|
|
&& (shuLiConfig.PandingCode == 2 || shuLiConfig.PandingCode == 0))
|
|
|
{
|
|
|
item.StateCode = 2;
|
|
|
- //TxtLog.log(string.Format("颗粒编号{0}:超短粒", item.Num));
|
|
|
- //Console.WriteLine("颗粒编号{0}:超短粒", item.Num);
|
|
|
}
|
|
|
else if (item.MaxLength > shuLiConfig.MAX_Object_LENGTH
|
|
|
&& (shuLiConfig.PandingCode == 2 || shuLiConfig.PandingCode == 0))
|
|
|
{
|
|
|
item.StateCode = 1;
|
|
|
- //TxtLog.log(string.Format("颗粒编号{0}:超长粒", item.Num));
|
|
|
- //Console.WriteLine("颗粒编号{0}:超长粒", item.Num);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
item.StateCode = 0;
|
|
|
- //TxtLog.log(string.Format("颗粒编号{0}:正常粒", item.Num));
|
|
|
- //Console.WriteLine("颗粒编号{0}:正常粒", item.Num);
|
|
|
}
|
|
|
}
|
|
|
resultValue.Add(item);
|
|
|
@@ -172,13 +159,6 @@ namespace MvvmScaffoldFrame48.DLL.ImageAlgorithm
|
|
|
if (resultValue.Count > 0)
|
|
|
{
|
|
|
result = true;
|
|
|
- //LOG.log(string.Format("识别完成,首个颗粒编号:{0},颗粒数量:{1}", OneActive[0].Num, OneActive.Count), 6);
|
|
|
- //触发回调事件
|
|
|
- //Task.Run(() =>
|
|
|
- //{
|
|
|
- // OnWorkCompleted(OneActive);
|
|
|
- //});
|
|
|
- //ThreadPool.QueueUserWorkItem(_ => OnWorkCompleted(OneActive));
|
|
|
}
|
|
|
}
|
|
|
else
|