Commit 5504ad63 刘韬
2 个父辈 a8ca4df2 34134cee
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Asa.CarerayImage.xml</DocumentationFile> <DocumentationFile>
</DocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
...@@ -34,10 +35,10 @@ ...@@ -34,10 +35,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ConfigHelper"> <Reference Include="ConfigHelper">
<HintPath>..\..\ConfigHelper\ConfigHelper\bin\Debug\ConfigHelper.dll</HintPath> <HintPath>..\dll\ConfigHelper.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net"> <Reference Include="log4net">
<HintPath>..\..\..\..\DLL\log4net.dll</HintPath> <HintPath>..\dll\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
...@@ -20,7 +20,8 @@ namespace Asa ...@@ -20,7 +20,8 @@ namespace Asa
//加载模板到内存 //加载模板到内存
static IntPtr hModelIDs = IntPtr.Zero; static IntPtr hModelIDs = IntPtr.Zero;
static XrayImage(){ static XrayImage()
{
if (!Directory.Exists("CountTemplate")) if (!Directory.Exists("CountTemplate"))
Directory.CreateDirectory("CountTemplate"); Directory.CreateDirectory("CountTemplate");
...@@ -58,14 +59,14 @@ namespace Asa ...@@ -58,14 +59,14 @@ namespace Asa
/// <summary> /// <summary>
/// Careray平板图像 /// Careray平板图像
/// </summary> /// </summary>
public XrayImage(string logName = "CarerayImage",DeviceType deviceType=DeviceType.CARREY) public XrayImage(string logName = "CarerayImage", DeviceType deviceType = DeviceType.CARREY)
{ {
if (deviceType == DeviceType.CARREY) if (deviceType == DeviceType.CARREY)
device = new CarerayImage(logName); device = new CarerayImage(logName);
else else
device = new haobo(logName); device = new haobo(logName);
} }
/// <summary> /// <summary>
/// 打开设备 /// 打开设备
...@@ -84,6 +85,7 @@ namespace Asa ...@@ -84,6 +85,7 @@ namespace Asa
{ {
return device.Close(); return device.Close();
} }
/// <summary> /// <summary>
/// 获取图像 /// 获取图像
/// </summary> /// </summary>
...@@ -92,6 +94,7 @@ namespace Asa ...@@ -92,6 +94,7 @@ namespace Asa
{ {
return device.GetImage(_MaxFrameCount, MaxDelay); return device.GetImage(_MaxFrameCount, MaxDelay);
} }
/// <summary> /// <summary>
/// 获取48位RGB图像 /// 获取48位RGB图像
/// </summary> /// </summary>
...@@ -100,6 +103,7 @@ namespace Asa ...@@ -100,6 +103,7 @@ namespace Asa
{ {
return device.Get48bImage(); return device.Get48bImage();
} }
/// <summary> /// <summary>
/// 获取raw数据指针 /// 获取raw数据指针
/// </summary> /// </summary>
...@@ -108,6 +112,7 @@ namespace Asa ...@@ -108,6 +112,7 @@ namespace Asa
{ {
return device.GetRawBufferHandle(); return device.GetRawBufferHandle();
} }
/// <summary> /// <summary>
/// 释放raw指针 /// 释放raw指针
/// </summary> /// </summary>
...@@ -115,6 +120,7 @@ namespace Asa ...@@ -115,6 +120,7 @@ namespace Asa
{ {
device.FreeRawBufferHandle(); device.FreeRawBufferHandle();
} }
/// <summary> /// <summary>
/// 本地文件普通器件点料 /// 本地文件普通器件点料
/// </summary> /// </summary>
...@@ -124,58 +130,63 @@ namespace Asa ...@@ -124,58 +130,63 @@ namespace Asa
/// <param name="tpDstImg"></param> /// <param name="tpDstImg"></param>
/// <returns></returns> /// <returns></returns>
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static int GetLocalCount(string path, int ShrinkOffset, out string count, out EyemImage tpDstImg) public static int GetLocalCount(string path, int ShrinkOffset, out int[] count, out Bitmap BmpDstImg)
{ {
count = ""; count = null;
tpDstImg = new EyemImage(); BmpDstImg = null;
string fileName = System.IO.Path.GetFileNameWithoutExtension(path); string fileName = Path.GetFileNameWithoutExtension(path);
int flag = eyemImageRead(path, -1, out EyemImage eyem); int flag = eyemImageRead(path, -1, out EyemImage eyem);
if (flag != 0) return -1; if (flag != 0) return -1;
int n = GetLocalCount(eyem, ShrinkOffset, fileName, out count, out tpDstImg); int n = GetLocalCount(eyem, ShrinkOffset, fileName, out count, out BmpDstImg);
eyemImageFree(ref eyem); eyemImageFree(ref eyem);
return n; return n;
} }
[HandleProcessCorruptedStateExceptions]
public static int GetLocalCount(EyemImage eyem, int ShrinkOffset, string outfilename, out string count, out EyemImage tpDstImg)
{
var tpRoi = new EyemRect();
tpRoi.iXs = 0 + ShrinkOffset;
tpRoi.iYs = 0 + ShrinkOffset;
tpRoi.iWidth = eyem.iWidth - ShrinkOffset * 2;
tpRoi.iHeight = eyem.iHeight - ShrinkOffset * 2;
int n;
string pNumObj = null;
setSkipProcessID(-1);
n = eyemCountObject(eyem, tpRoi, outfilename, 0, 0, 0, 0, ref pNumObj, out tpDstImg);
count = pNumObj;
return n;
}
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static int GetLocalCountE(EyemImage eyem, EyemRect? tpRoi, string outfilename, double dOffset, int iWinSize, out string count, out EyemImage tpDstImg) public static int GetLocalCount(EyemImage eyem, int ShrinkOffset, string outfilename, out int[] count, out Bitmap BmpDstImg)
{ {
if (tpRoi == null) { BmpDstImg = null;
var ntpRoi = new EyemRect(); EyemRect tpRoi = new EyemRect
ntpRoi.iXs = 0; {
ntpRoi.iYs = 0; iXs = 0 + ShrinkOffset,
ntpRoi.iWidth = eyem.iWidth; iYs = 0 + ShrinkOffset,
ntpRoi.iHeight = eyem.iHeight; iWidth = eyem.iWidth - ShrinkOffset * 2,
} iHeight = eyem.iHeight - ShrinkOffset * 2
count = ""; };
int n;
tpDstImg = new EyemImage(); int[] ipReelNum = new int[4];
string pNumObj = null;
setSkipProcessID(-1); setSkipProcessID(-1);
n = eyemCountObject(eyem, tpRoi.Value, outfilename, dOffset, 0, 100, iWinSize, ref pNumObj, out tpDstImg); int n = eyemCountObjectE(eyem, tpRoi, outfilename, ipReelNum, out EyemImage tpDstImg);
//int eyemCountObjectE(EyemImage tpImage, string fileName, ref string pNumObj, out EyemImage tpDstImg); count = ipReelNum;
count = pNumObj; if (n == 0)
BmpDstImg = eyemCvtToBitmap(tpDstImg);
eyemImageFree(ref tpDstImg);
return n; return n;
} }
//[HandleProcessCorruptedStateExceptions]
//public static int GetLocalCountE(EyemImage eyem, EyemRect? tpRoi, string outfilename, double dOffset, int iWinSize, out string count, out EyemImage tpDstImg)
//{
// if (tpRoi == null) {
// var ntpRoi = new EyemRect();
// ntpRoi.iXs = 0;
// ntpRoi.iYs = 0;
// ntpRoi.iWidth = eyem.iWidth;
// ntpRoi.iHeight = eyem.iHeight;
// }
// count = "";
// int n;
// tpDstImg = new EyemImage();
// string pNumObj = null;
// setSkipProcessID(-1);
// n = eyemCountObject(eyem, tpRoi.Value, outfilename, dOffset, 0, 100, iWinSize, ref pNumObj, out tpDstImg);
// count = pNumObj;
// return n;
//}
/// <summary> /// <summary>
/// 本地文件异性器件点料 /// 本地文件异性器件点料
/// </summary> /// </summary>
...@@ -186,59 +197,67 @@ namespace Asa ...@@ -186,59 +197,67 @@ namespace Asa
/// <param name="tpDstImg"></param> /// <param name="tpDstImg"></param>
/// <returns></returns> /// <returns></returns>
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static int GetLocalCountIrregular(string path, int ShrinkOffset, string type, out string count, out EyemImage tpDstImg) public static int GetLocalCountIrregular(string path, int ShrinkOffset, string type, out int[] count, out Bitmap BmpDstImg)
{ {
count = ""; count = null;
tpDstImg = new EyemImage(); BmpDstImg = null;
string fileName = System.IO.Path.GetFileNameWithoutExtension(path); string fileName = Path.GetFileNameWithoutExtension(path);
int flag = eyemImageRead(path, -1, out EyemImage eyem); int flag = eyemImageRead(path, -1, out EyemImage eyem);
if (flag != 0) return -1; if (flag != 0) return -1;
int n = GetLocalCountIrregular(eyem, ShrinkOffset, fileName, type, out count, out tpDstImg); int n = GetLocalCountIrregular(eyem, ShrinkOffset, fileName, type, out count, out BmpDstImg);
eyemImageFree(ref eyem); eyemImageFree(ref eyem);
return n; return n;
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static int GetLocalCountIrregular(EyemImage eyem, int ShrinkOffset, string outfilename, string type, out string count, out EyemImage tpDstImg) public static int GetLocalCountIrregular(EyemImage eyem, int ShrinkOffset, string outfilename, string type, out int[] count, out Bitmap BmpDstImg)
{ {
int n; BmpDstImg = null;
string pNumObj = null;
var tpRoi = new EyemRect(); EyemRect tpRoi = new EyemRect
tpRoi.iXs = 0 + ShrinkOffset; {
tpRoi.iYs = 0 + ShrinkOffset; iXs = 0 + ShrinkOffset,
tpRoi.iWidth = eyem.iWidth - ShrinkOffset * 2; iYs = 0 + ShrinkOffset,
tpRoi.iHeight = eyem.iHeight - ShrinkOffset * 2; iWidth = eyem.iWidth - ShrinkOffset * 2,
iHeight = eyem.iHeight - ShrinkOffset * 2
};
setSkipProcessID(-1); setSkipProcessID(-1);
n = eyemCountObjectIrregularParts(eyem, tpRoi, outfilename, 0, type, 0, 0, ref pNumObj, out tpDstImg);
count = pNumObj; int[] ipReelNum = new int[4];
int n = eyemCountObjectIrregularParts(eyem, tpRoi, outfilename, type, ipReelNum, out EyemImage tpDstImg);
count = ipReelNum;
if (n == 0)
BmpDstImg = eyemCvtToBitmap(tpDstImg);
eyemImageFree(ref tpDstImg);
return n; return n;
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static int GetLocalCountTemplate(string path, int ShrinkOffset,string template, out string count, out Bitmap BmpDstImg) public static int GetLocalCountTemplate(string path, int ShrinkOffset, string template, out int[] count, out Bitmap BmpDstImg)
{ {
count = ""; count = null;
BmpDstImg = null; BmpDstImg = null;
string fileName = System.IO.Path.GetFileNameWithoutExtension(path); string fileName = System.IO.Path.GetFileNameWithoutExtension(path);
int flag = eyemImageRead(path, -1, out EyemImage eyem); int flag = eyemImageRead(path, -1, out EyemImage eyem);
if (flag != 0) return -1; if (flag != 0) return -1;
int n = GetLocalCountTemplate(eyem, ShrinkOffset, fileName,template, out count, out BmpDstImg); int n = GetLocalCountTemplate(eyem, ShrinkOffset, fileName, template, out count, out BmpDstImg);
eyemImageFree(ref eyem); eyemImageFree(ref eyem);
return n; return n;
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static int GetLocalCountTemplate(EyemImage eyem, int ShrinkOffset, string outfilename,string template, out string count, out Bitmap BmpDstImg) public static int GetLocalCountTemplate(EyemImage eyem, int ShrinkOffset, string outfilename, string template, out int[] count, out Bitmap BmpDstImg)
{ {
setSkipProcessID(-1); setSkipProcessID(-1);
EyemImage tpDstImg; EyemImage tpDstImg;
BmpDstImg = null; BmpDstImg = null;
int n, flag; int n, flag;
string pNumObj = null; count = null;
count = "";
var tpRoi = new EyemRect(); var tpRoi = new EyemRect();
tpRoi.iXs = 0 + ShrinkOffset; tpRoi.iXs = 0 + ShrinkOffset;
tpRoi.iYs = 0 + ShrinkOffset; tpRoi.iYs = 0 + ShrinkOffset;
...@@ -256,18 +275,20 @@ namespace Asa ...@@ -256,18 +275,20 @@ namespace Asa
if (selectModel == "") if (selectModel == "")
return flag; return flag;
} }
else { else
{
selectModel = template; selectModel = template;
} }
n = eyemCountObjectIrregularPartsE(eyem, tpRoi, outfilename, selectModel, hModelIDs, ref pNumObj, out tpDstImg);
count = pNumObj; int[] ipReelNum = new int[4];
n = eyemCountObjectIrregularPartsE(eyem, tpRoi, outfilename, selectModel, hModelIDs, ipReelNum, out tpDstImg);
count = ipReelNum;
if (n == 0) if (n == 0)
{
BmpDstImg = eyemCvtToBitmap(tpDstImg); BmpDstImg = eyemCvtToBitmap(tpDstImg);
}
eyemImageFree(ref tpDstImg); eyemImageFree(ref tpDstImg);
return n; return n;
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static Bitmap GetTemplateBitmap(string bitmapfile, int ShrinkOffset, out string selectModel) public static Bitmap GetTemplateBitmap(string bitmapfile, int ShrinkOffset, out string selectModel)
{ {
...@@ -293,8 +314,9 @@ namespace Asa ...@@ -293,8 +314,9 @@ namespace Asa
return BmpDstImg; return BmpDstImg;
} }
[HandleProcessCorruptedStateExceptions] [HandleProcessCorruptedStateExceptions]
public static bool SaveTemplate(string bitmapfile, Rectangle rect, int ShrinkOffset, double matchDeg,out string selectModel,out string count, out Bitmap BmpDstImg) public static bool SaveTemplate(string bitmapfile, Rectangle rect, int ShrinkOffset, double matchDeg, out string selectModel, out int[] count, out Bitmap BmpDstImg)
{ {
setSkipProcessID(-1); setSkipProcessID(-1);
EyemImage tpDstImg; EyemImage tpDstImg;
...@@ -304,7 +326,7 @@ namespace Asa ...@@ -304,7 +326,7 @@ namespace Asa
var tpRoi = new EyemRect(); var tpRoi = new EyemRect();
tpRoi.iXs = 0 + ShrinkOffset; tpRoi.iXs = 0 + ShrinkOffset;
tpRoi.iYs = 0 + ShrinkOffset; tpRoi.iYs = 0 + ShrinkOffset;
tpRoi.iWidth = eyem.iWidth- ShrinkOffset*2; tpRoi.iWidth = eyem.iWidth - ShrinkOffset * 2;
tpRoi.iHeight = eyem.iHeight - ShrinkOffset * 2; tpRoi.iHeight = eyem.iHeight - ShrinkOffset * 2;
//获取用于制作模板的图像 //获取用于制作模板的图像
...@@ -326,21 +348,23 @@ namespace Asa ...@@ -326,21 +348,23 @@ namespace Asa
//可以选择使用自动匹配或者指定模板文件 //可以选择使用自动匹配或者指定模板文件
selectModel = file; selectModel = file;
string pNumObj = ""; int[] ipReelNum = new int[4];
int n = eyemCountObjectIrregularPartsE(eyem, tpRoi, "123", selectModel, hModelIDs, ref pNumObj, out tpDstImg); int n = eyemCountObjectIrregularPartsE(eyem, tpRoi, "123", selectModel, hModelIDs, ipReelNum, out tpDstImg);
BmpDstImg = eyemCvtToBitmap(tpDstImg); BmpDstImg = eyemCvtToBitmap(tpDstImg);
eyemImageFree(ref tpDstImg); eyemImageFree(ref tpDstImg);
eyemImageFree(ref eyem); eyemImageFree(ref eyem);
count = pNumObj; count = ipReelNum;
return true; return true;
} }
//测试移除模板
public static void RemoveModelByName(string file){ public static void RemoveModelByName(string file)
{
//测试移除模板 //测试移除模板
eyemRemoveModelByName(hModelIDs, file); eyemRemoveModelByName(hModelIDs, file);
} }
public static Bitmap tplToBitmap(string tplfile,out double MatchDeg)
public static Bitmap tplToBitmap(string tplfile, out double MatchDeg)
{ {
//根据名称获取模板 //根据名称获取模板
EyemModelID tpModelID = new EyemModelID(); EyemModelID tpModelID = new EyemModelID();
...@@ -353,17 +377,23 @@ namespace Asa ...@@ -353,17 +377,23 @@ namespace Asa
//eyemImageFree(ref tpModeImg); //eyemImageFree(ref tpModeImg);
return BmpDstImg; return BmpDstImg;
} }
public static void ReloadTpl() public static void ReloadTpl()
{ {
eyemReleaseModel(ref hModelIDs); eyemReleaseModel(ref hModelIDs);
var flag = eyemInitModel("CountTemplate", out hModelIDs); var flag = eyemInitModel("CountTemplate", out hModelIDs);
} }
public static Action SkipCounting() {
return () => { eyemLib.setSkipProcessID(0); public static Action SkipCounting()
{
return () =>
{
eyemLib.setSkipProcessID(0);
System.Threading.Thread.Sleep(200); System.Threading.Thread.Sleep(200);
}; };
} }
public void LoadRAW(string filePath) public void LoadRAW(string filePath)
{ {
device.LoadRAW(filePath); device.LoadRAW(filePath);
......
...@@ -16,91 +16,48 @@ namespace Asa ...@@ -16,91 +16,48 @@ namespace Asa
/// </summary> /// </summary>
public static unsafe class eyemLib public static unsafe class eyemLib
{ {
/// <summary> //读取图像
/// 读取图像
/// </summary>
/// <param name="filename"></param>
/// <param name="iFalgs">填 -1</param>
/// <param name="ucpImage"></param>
/// <returns></returns>
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
public static extern int eyemImageRead(string filename, int iFalgs, out EyemImage ucpImage); public static extern int eyemImageRead(string filename, int iFalgs, out EyemImage ucpImage);
/// <summary> //释放图像资源
/// 释放图像资源
/// </summary>
/// <param name="eyemImage"></param>
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
public static extern void eyemImageFree(ref EyemImage eyemImage); public static extern void eyemImageFree(ref EyemImage eyemImage);
/// <summary>
/// 普通器件
/// </summary>
/// <param name="tpSrcImg"></param>
/// <param name="tpRoi"></param>
/// <param name="fileName"></param>
/// <param name="dOffset"></param>
/// <param name="iMinArea"></param>
/// <param name="iMaxArea"></param>
/// <param name="iWinSize"></param>
/// <param name="pNumObj"></param>
/// <param name="tpDstImg"></param>
/// <returns></returns>
//[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
//internal static extern int eyemCountObject(EyemImage tpSrcImg, string fileName, double dOffset, int iMinArea, int iMaxArea, int iWinSize, ref IntPtr pNumObj, out EyemImage tpDstImg);
/// <summary> //普通器件(仍采用旧的算法)
/// 异型器件
/// </summary>
/// <param name="tpSrcImg"></param>
/// <param name="fileName"></param>
/// <param name="dOffset"></param>
/// <param name="strType"></param>
/// <param name="iMaxArea"></param>
/// <param name="iWinSize"></param>
/// <param name="pNumObj"></param>
/// <param name="tpDstImg"></param>
/// <returns></returns>
//[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
//internal static extern int eyemCountObjectIrregularParts(EyemImage tpSrcImg, string fileName, double dOffset, string strType, int iMaxArea, int iWinSize, ref IntPtr pNumObj, out EyemImage tpDstImg);
/// <summary>
/// 普通器件
/// </summary>
/// <param name="tpSrcImg"></param>
/// <param name="tpRoi"></param>
/// <param name="fileName"></param>
/// <param name="dOffset"></param>
/// <param name="iMinArea"></param>
/// <param name="iMaxArea"></param>
/// <param name="iWinSize"></param>
/// <param name="pNumObj"></param>
/// <param name="tpDstImg"></param>
/// <returns></returns>
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
internal static extern int eyemCountObject(EyemImage tpSrcImg, EyemRect tpRoi, string fileName, double dOffset, int iMinArea, int iMaxArea, int iWinSize, ref string pNumObj, out EyemImage tpDstImg); public static extern int eyemCountObject(EyemImage tpImage, EyemRect tpRoi, string fileName, [MarshalAs(UnmanagedType.LPArray)] int[] ipReelNum, out EyemImage tpDstImg);
/// <summary> //异型器件(新版本新算法)
/// 异型器件
/// </summary>
/// <param name="tpSrcImg"></param>
/// <param name="tpRoi"></param>
/// <param name="fileName"></param>
/// <param name="dOffset"></param>
/// <param name="strType"></param>
/// <param name="iMaxArea"></param>
/// <param name="iWinSize"></param>
/// <param name="pNumObj"></param>
/// <param name="tpDstImg"></param>
/// <returns></returns>
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
internal static extern int eyemCountObjectIrregularParts(EyemImage tpSrcImg, EyemRect tpRoi, string fileName, double dOffset, string strType, int iMaxArea, int iWinSize, ref string pNumObj, out EyemImage tpDstImg); public static extern int eyemCountObjectIrregularParts(EyemImage tpImage, EyemRect tpRoi, string fileName, string strType, [MarshalAs(UnmanagedType.LPArray)] int[] ipReelNum, out EyemImage tpDstImg);
//普通器件(新版本)
//普通器件(新版本新算法)
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
internal static extern int eyemCountObjectE(EyemImage tpImage, EyemRect tpRoi, string fileName, ref string pNumObj, out EyemImage tpDstImg); public static extern int eyemCountObjectE(EyemImage tpImage, EyemRect tpRoi, string fileName, [MarshalAs(UnmanagedType.LPArray)] int[] ipReelNum, out EyemImage tpDstImg);
//异型器件(新版本)
//异型器件(新版本模板匹配)
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
internal static extern int eyemCountObjectIrregularPartsE(EyemImage tpImage, EyemRect tpRoi, string fileName, string ccTplName, IntPtr hModelIDs, ref string pNumObj, out EyemImage tpDstImg); public static extern int eyemCountObjectIrregularPartsE(EyemImage tpImage, EyemRect tpRoi, string fileName, string ccTplName, IntPtr hModelID, [MarshalAs(UnmanagedType.LPArray)] int[] ipReelNum, out EyemImage tpDstImg);
//[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
//internal static extern int eyemCountObject(EyemImage tpSrcImg, EyemRect tpRoi, string fileName, double dOffset, int iMinArea, int iMaxArea, int iWinSize, ref string pNumObj, out EyemImage tpDstImg);
//[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
//internal static extern int eyemCountObjectIrregularParts(EyemImage tpSrcImg, EyemRect tpRoi, string fileName, double dOffset, string strType, int iMaxArea, int iWinSize, ref string pNumObj, out EyemImage tpDstImg);
//[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
//internal static extern int eyemCountObjectE(EyemImage tpImage, EyemRect tpRoi, string fileName, ref string pNumObj, out EyemImage tpDstImg);
//[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
//internal static extern int eyemCountObjectIrregularPartsE(EyemImage tpImage, EyemRect tpRoi, string fileName, string ccTplName, IntPtr hModelIDs, ref string pNumObj, out EyemImage tpDstImg);
//创建模板匹配模型 //创建模板匹配模型
[DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)] [DllImport("eyemLib.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
......
此文件类型无法预览
<?xml version="1.0"?>
<doc>
<assembly>
<name>ConfigHelper</name>
</assembly>
<members>
<member name="M:ConfigHelper.Config.Get``1(System.Object,``0)">
<summary>
读取配置
</summary>
<typeparam name="T">返回类型</typeparam>
<param name="key">传入一个枚举值</param>
<param name="defaultvalue">失败默认值</param>
<returns></returns>
</member>
</members>
</doc>
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!