hzt_asc 1.0.4 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ask.cc +211 -227
- package/ask.h +11 -6
- package/package.json +1 -1
- package/sample/demo.js +1458 -71
package/ask.h
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
#include "asvloffscreen.h"
|
|
8
8
|
#include "merror.h"
|
|
9
9
|
#include <string>
|
|
10
|
+
#include <vector>
|
|
10
11
|
typedef struct __face_score
|
|
11
12
|
{
|
|
12
13
|
MInt32 searchId;
|
|
@@ -17,7 +18,8 @@ typedef struct __face_score
|
|
|
17
18
|
typedef struct{
|
|
18
19
|
MInt32 searchId; // 唯一标识符
|
|
19
20
|
LPASF_FaceFeature feature; // 人脸特征值
|
|
20
|
-
|
|
21
|
+
std::string tag;
|
|
22
|
+
//MPCChar tag; // 备注
|
|
21
23
|
}ASF_FaceFeatureInfo, *LPASF_FaceFeatureInfo;
|
|
22
24
|
|
|
23
25
|
class ASK : public Napi::ObjectWrap<ASK> {
|
|
@@ -35,7 +37,6 @@ class ASK : public Napi::ObjectWrap<ASK> {
|
|
|
35
37
|
// Napi::Value RegisterFaceFeature(const Napi::CallbackInfo& info);
|
|
36
38
|
// Napi::Value SearchFaceFeature(const Napi::CallbackInfo& info);
|
|
37
39
|
|
|
38
|
-
|
|
39
40
|
Napi::Value ImageFaceCompare(const Napi::CallbackInfo& info);
|
|
40
41
|
|
|
41
42
|
Napi::Value faceDetectUrl(const Napi::CallbackInfo& info);
|
|
@@ -48,15 +49,19 @@ class ASK : public Napi::ObjectWrap<ASK> {
|
|
|
48
49
|
void getSdkRelatedInfo();
|
|
49
50
|
void timestampToTime(char* timeStamp, char* dateTime, int dateTimeSize);
|
|
50
51
|
int ColorSpaceConversion(MInt32 width, MInt32 height, MInt32 format, MUInt8* imgData, ASVLOFFSCREEN& offscreen);
|
|
51
|
-
void processFile(const char* filePath, MUInt8* imageData, ASVLOFFSCREEN& offscreen);
|
|
52
|
-
|
|
52
|
+
//void processFile(const char* filePath, MUInt8* imageData, ASVLOFFSCREEN& offscreen);
|
|
53
|
+
MUInt8* processFile(const char* filePath, int& picWidth, int& picHeight);
|
|
54
|
+
//void processFileUrl(const char* filePath, MUInt8* imageData, ASVLOFFSCREEN& offscreen);
|
|
55
|
+
MUInt8* processFileUrl(const char* url, int& picWidth, int& picHeight);
|
|
56
|
+
Napi::Array faceReg(std::vector<ASF_FaceFeatureInfo>& vecFeatureInfoList, ASF_MultiFaceInfo& detectedFaces, Napi::Env& env, ASVLOFFSCREEN& offscreen);
|
|
53
57
|
|
|
54
58
|
// void mFaceDetect(ASVLOFFSCREEN& offscree, ASF_MultiFaceInfo* detectedFaces);
|
|
55
59
|
// void mFaceFeatureExtract(ASVLOFFSCREEN& offscree, ASF_MultiFaceInfo* detectedFaces);
|
|
56
60
|
|
|
57
61
|
MHandle handle;
|
|
58
|
-
ASF_FaceFeatureInfo* mFeatureInfoList;
|
|
59
|
-
MUInt32 mFeatureLen;
|
|
62
|
+
// ASF_FaceFeatureInfo* mFeatureInfoList;
|
|
63
|
+
// MUInt32 mFeatureLen;
|
|
64
|
+
std::vector<ASF_FaceFeatureInfo> m_vecFeatureInfoList;
|
|
60
65
|
};
|
|
61
66
|
|
|
62
67
|
#endif
|