Video Analysis底层库拆分,sdk的go封装
chenshijun
2019-10-22 b7340a34ff68f018a4aa0e7aada3b7feaabd2fe1
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#ifndef THFACEPROP_I_H
#define THFACEPROP_I_H
 
#include "THFaceImage_i.h"
 
/*
* ============================================================================
*  Name     : THFaceProperty_i.h
*  Part of  : Face Property (THFaceProperty) SDK
*  Created  : 7.8.2016 by XXX
*  Description:
*     THFaceProp_i.h -  Face Property (THFaceProperty) SDK header file
*  Version  : 1.0.0
*  Copyright: All Rights Reserved by XXXX
*  Revision:
* ============================================================================
*/
 
struct THFP_Result_V1
{
    int gender;//1-male,0-female
    int age;//range[0-100]
    int beauty_level;//range[0-100]
    int smile_level;//range[0-100]
};
 
struct THFP_Result_V2
{
    int gender;//1-male,0-female
    int age;//range[0-100]
    int race; //[1-white,2-yellow,3-black]
    int beauty_level;//range[0-100]
    int smile_level;//range[0-100]
};
 
#define THFACEPROP_API extern "C"
 
THFACEPROP_API int        THFP_Create(short nChannelNum);
/*
 The THFP_Create function will initialize the algorithm engine module
 
 Parameters:
    nChannelNum[intput],algorithm channel num,for multi-thread mode,one thread uses one channel
 Return Values:
    If the function succeeds, the return value is valid channel number.
    If the function fails, the return value is zero or negative;
    error code:
        -99,invalid license.
 Remarks: 
    This function only can be called one time at program initialization.
*/
 
THFACEPROP_API void        THFP_Release();
/*
The THFP_Release function will release the algorithm engine module
 
Parameters:
    No parameter.
Return Values:
    No return value.
Remarks:
    This function only can be called one time at program exit.
*/
 
THFACEPROP_API int        THFP_Execute_V1(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfp, THFP_Result_V1* pResult);
/*
The THFP_Execute_V1 function execute face property analysis.
 
Parameters:
    nChannelID[input],channel ID(from 0 to nChannelNum-1)
    pBGR[input],point to an image buffer,BGR format.
    nWidth[input],the image width.
    nHeight[input],the image height.
    ptfp[input],the facial data of a face.
    pResult[output],the face property result
Return Values:
    If the function succeeds, the return value is 0.
    If the function fails, the return value is nagative.
    error code:
        -99,invalid license.
        -1,pBuf,ptfp,pFeature is NULL
        -2,nChannelID is invalid or SDK is not initialized
Remarks:
    No remark.
*/
THFACEPROP_API int        THFP_Execute_1N_V1(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfps, THFP_Result_V1* pResults,int nFaceCount);
/*
The THFP_Execute_1N_V1 function execute face property analysis.
 
Parameters:
    nChannelID[input],channel ID(from 0 to nChannelNum-1)
    pBGR[input],point to an image buffer,BGR format.
    nWidth[input],the image width.
    nHeight[input],the image height.
    ptfps[input],the facial data of muti-faces
    pResults[output],the face property results of muti-faces
    nFaceCount[input],the face number
Return Values:
    If the function succeeds, the return value is 0.
    If the function fails, the return value is nagative.
    error code:
        -99,invalid license.
        -1,pBGR,ptfps,pResults is NULL,OR nFaceCount is less than 1
        -2,nChannelID is invalid or SDK is not initialized
Remarks:
    No remark.
*/
THFACEPROP_API int        THFP_Execute_V2(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfp, THFP_Result_V2* pResult);
/*
The THFP_Execute_V2 function execute face property analysis.
 
Parameters:
    nChannelID[input],channel ID(from 0 to nChannelNum-1)
    pBGR[input],point to an image buffer,BGR format.
    nWidth[input],the image width.
    nHeight[input],the image height.
    ptfp[input],the facial data of a face.
    pResult[output],the face property result
Return Values:
    If the function succeeds, the return value is 0.
    If the function fails, the return value is nagative.
error code:
    -99,invalid license.
    -1,pBGR,ptfp,pResult is NULL
    -2,nChannelID is invalid or SDK is not initialized
Remarks:
    No remark.
*/
 
THFACEPROP_API int        THFP_Execute_1N_V2(short nChannelID, BYTE* pBGR, int nWidth, int nHeight, THFI_FacePos* ptfps, THFP_Result_V2* pResults, int nFaceCount);
/*
The THFP_Execute_1N_V2 function execute face property analysis.
 
Parameters:
    nChannelID[input],channel ID(from 0 to nChannelNum-1)
    pBGR[input],point to an image buffer,BGR format.
    nWidth[input],the image width.
    nHeight[input],the image height.
    ptfps[input],the facial data of muti-faces
    pResults[output],the face property results of muti-faces
    nFaceCount[input],the face number
Return Values:
    If the function succeeds, the return value is 0.
    If the function fails, the return value is nagative.
error code:
    -99,invalid license.
    -1,pBGR,ptfps,pResults is NULL,OR nFaceCount is less than 1
    -2,nChannelID is invalid or SDK is not initialized
Remarks:
    No remark.
*/
 
#endif