Commit 9bdb6abc 刘韬

1

1 个父辈 64fe067f
...@@ -183,12 +183,19 @@ namespace Asa ...@@ -183,12 +183,19 @@ namespace Asa
int[] ipReelNum = new int[4]; int[] ipReelNum = new int[4];
setSkipProcessID(-1); setSkipProcessID(-1);
int n = eyemCountObjectE(eyem, tpRoi, outfilename, ipReelNum, out EyemImage tpDstImg); try
count = ipReelNum; {
if (n == 0) int n = eyemCountObjectE(eyem, tpRoi, outfilename, ipReelNum, out EyemImage tpDstImg);
BmpDstImg = eyemCvtToBitmap(tpDstImg); count = ipReelNum;
eyemImageFree(ref tpDstImg); if (n == 0)
return n; BmpDstImg = eyemCvtToBitmap(tpDstImg);
eyemImageFree(ref tpDstImg);
return n;
}
catch {
count = new int[4];
return -999;
}
} }
//[HandleProcessCorruptedStateExceptions] //[HandleProcessCorruptedStateExceptions]
......
...@@ -5,6 +5,7 @@ using System.Drawing; ...@@ -5,6 +5,7 @@ using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -35,6 +36,7 @@ namespace Asa ...@@ -35,6 +36,7 @@ namespace Asa
//普通器件(新版本新算法) //普通器件(新版本新算法)
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
[HandleProcessCorruptedStateExceptions]
public static extern int eyemCountObjectE(EyemImage tpImage, EyemRect tpRoi, string fileName, [MarshalAs(UnmanagedType.LPArray)] int[] ipReelNum, out EyemImage tpDstImg); public static extern int eyemCountObjectE(EyemImage tpImage, EyemRect tpRoi, string fileName, [MarshalAs(UnmanagedType.LPArray)] int[] ipReelNum, out EyemImage tpDstImg);
//异型器件(新版本模板匹配) //异型器件(新版本模板匹配)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!