8ca6e89d
Tuo Wenbo
20211021
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
using System;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
namespace OS.Spin.SdkLayer
{
public class SdkLoad
{
private const string SdkDll = "TFD.dll";
/*************************************************************************
* FUNCTION: TFD_Init
* PURPOSE: 初始化
* PARAM:
[in/out] handle - 句柄
[in] params - 参数
* RETURN: 成功(0)或者错误代码(<0)
* NOTES:
*************************************************************************/
[HandleProcessCorruptedStateExceptions]
[DllImport(SdkDll, EntryPoint = "TFD_Init", CallingConvention = CallingConvention.Cdecl)]
public static extern int TFD_Init(ref IntPtr handle, Modle.Sdk.StructInfos.TFD_PARAM param);
[HandleProcessCorruptedStateExceptions]
[DllImport(SdkDll, EntryPoint = "TFD_Init_5", CallingConvention = CallingConvention.Cdecl)]
public static extern int TFD_Init_5(ref IntPtr handle, Modle.Sdk.StructInfos.TFD_PARAM param);
[HandleProcessCorruptedStateExceptions]
[DllImport(SdkDll, EntryPoint = "TFD_Init_37", CallingConvention = CallingConvention.Cdecl)]
public static extern int TFD_Init_37(ref IntPtr handle, Modle.Sdk.StructInfos.TFD_PARAM param);
/*************************************************************************
* FUNCTION: TFD_ProcessBatch
* PURPOSE: 检测
* PARAM:
[in] handle - 处理句柄
[in] imgArray - 图片数据(3通道BGR数据 cv::Mat格式)
[in] batchsize - 批量数
[in/out] result - 检测结果
* RETURN: 成功(0)或者错误代码(<0)
* NOTES:
*************************************************************************/
[HandleProcessCorruptedStateExceptions]
[DllImport(SdkDll, EntryPoint = "TFD_ProcessBatch", CallingConvention = CallingConvention.Cdecl)]
public static extern int TFD_ProcessBatch(IntPtr handle, Modle.Sdk.StructInfos.DATA_IMAGE[] imgArray, int batchsize, IntPtr result);
//
/*************************************************************************
* FUNCTION: TFD_ProcessBatch
* PURPOSE: 检测
* PARAM:
[in] handle - 处理句柄
[in] imgArray - 图片数据(3通道BGR数据 cv::Mat格式)
[in] batchsize - 批量数
[in/out] result - 检测结果
* RETURN: 成功(0)或者错误代码(<0)
* NOTES:
*************************************************************************/
[HandleProcessCorruptedStateExceptions]
[DllImport(SdkDll, EntryPoint = "TFD_ProcessBatch_ex", CallingConvention = CallingConvention.Cdecl)]
public static extern int TFD_ProcessBatch_ex(IntPtr handle, IntPtr imgArray,int w,int h, int batchsize, IntPtr result);
}
}
|