From 595a5ee8ec01e0199b3d69311151417307f3b264 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期三, 15 一月 2020 11:30:41 +0800
Subject: [PATCH] copy from bgr-2-analysis

---
 cface.h |   64 +++++++++++++++++---------------
 1 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/cface.h b/cface.h
index e9a3234..c1d0076 100644
--- a/cface.h
+++ b/cface.h
@@ -1,36 +1,40 @@
-#ifndef _c_face_h_
-#define _c_face_h_
- 
+#ifndef _c_wrapper_sdk_h_
+#define _c_wrapper_sdk_h_
+
 #ifdef __cplusplus
 extern "C"{
 #endif
- 
-#include "csrc/struct.h"
- 
-void *create_sdkface();
-void release(void *handle);
- 
-int init_detector(void *handle, const int min_faces, const int roll_angles, 
-                    const int threads_max, const int gpu);
- 
-int init_extractor(void *handle, const int threads_max, const int gpu);
-int init_propertizer(void *handle, const int threads_max);
- 
-int init_tracker(void *handle, const int width, const int height,
-            const int max_faces, const int interval, const int sample_size,
-            const int threads_max, const int gpu);
- 
-int detect(void *handle, const void *data, const int w, const int h, const int c, const int chan, void **fpos, int *fcnt);
-int extract(void *handle, const cFacePos *pos, const void*data, const int w, const int h, const int c, const int chan, void **feat, int *featLen);
-float compare(void *handle, unsigned char *feat1, unsigned char *feat2);
- 
-int propertize(void *handle, const cFacePos *pos, const void *data, const int w, const int h, const int c, const int chan, void **res);
- 
-int track(void *handle, const void *data, const int w, const int h, const int c, const int chan, void **fInfo, int *fcnt);
-int track_resize(void *handle, const int w, const int h, const int chan);
- 
+
+#include "csdk_struct.h"
+
+#ifndef uchar 
+typedef unsigned char uchar;
+#endif
+
+typedef void* YoloHandle;
+
+int c_api_face_detector_init(const int tm, const int gi, const int minFaces, const int rollAngle);
+int c_api_face_property_init(const int tm);
+int c_api_face_extractor_init(const int tm, const int gi);
+int c_api_face_tracker_init(const int tm, const int gi, const int wid, const int hei,
+                              const int maxFaces, const int detinterval, const int sampleSize);
+int c_api_face_track_resize(const int chan, const int w, const int h);
+void c_api_release();
+///////////////////////////////////////////
+
+/// face api
+cFacePos* c_api_face_detect(int *faceCount, uchar*data, const int w, const int h, const int channel);
+cThftResult c_api_face_property(const cFacePos* pos, uchar*data, const int w, const int h, const int channel);
+
+uchar* c_api_face_extract(int *featLen, const cFacePos* pos, uchar*data, const int w, const int h, const int channel);
+float c_api_face_compare(uchar *feat1, uchar *feat2);
+cRECT* c_api_face_track_only(int *fCount, uchar *data, const int wid, const int hei, const int channel);
+cFaceInfo* c_api_face_track_detect(int *fCount, uchar *data, const int wid, const int hei, const int channel);
+cFaceInfo* c_api_face_track(int *fCount, uchar *data, const int wid, const int hei, const int channel);
+
 #ifdef __cplusplus
 }
 #endif
- 
-#endif
+
+
+#endif
\ No newline at end of file

--
Gitblit v1.8.0