Commit 9bdb6abc 刘韬

1

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