From fcc639d40cab8217c001870ce0ee834c440b3647 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期一, 16 十二月 2019 15:39:02 +0800 Subject: [PATCH] update --- csrc/face.h | 2 +- csrc/face.cpp | 11 +++++------ cface.cpp | 6 ++++-- cface.h | 2 +- goface.go | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/cface.cpp b/cface.cpp index a20e713..c5fe383 100644 --- a/cface.cpp +++ b/cface.cpp @@ -2,6 +2,7 @@ extern "C"{ #endif +#include <stdio.h> #include "cface.h" #ifdef __cplusplus @@ -79,7 +80,8 @@ return s->track(&img, chan, fInfo, fcnt); } -int resize(void *handle, const int w, const int h, const int chan){ +int track_resize(void *handle, const int w, const int h, const int chan){ sdkface *s = (sdkface*)handle; - return s->resize(w, h, chan); + printf("call cpp function\n"); + return s->track_resize(w, h, chan); } \ No newline at end of file diff --git a/cface.h b/cface.h index 7e9a226..9eaeec5 100644 --- a/cface.h +++ b/cface.h @@ -27,7 +27,7 @@ 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 resize(void *handle, const int w, const int h, const int chan); +int track_resize(void *handle, const int w, const int h, const int chan); #ifdef __cplusplus } diff --git a/csrc/face.cpp b/csrc/face.cpp index 21c7369..328111a 100644 --- a/csrc/face.cpp +++ b/csrc/face.cpp @@ -175,7 +175,7 @@ param.nSampleSize = sample_size > 0 ? sample_size : width/2; param.nDetectionIntervalFrame = interval; - printf("start threads: %d gi: %d size: %dx%d maxface: %d, sample: %d, interval: %d\n", + printf("##########start threads: %d gi: %d size: %dx%d maxface: %d, sample: %d, interval: %d\n", threads_max, gpu, width, height, max_faces, sample_size, interval); auto nNum = THFT_Create(threads_max, ¶m); @@ -185,7 +185,7 @@ dtors_.emplace_back([]{THFT_Release();}); } - printf("end threads: %d gi: %d size: %dx%d maxface: %d, sample: %d, interval: %d\n", + printf("##########end threads: %d gi: %d size: %dx%d maxface: %d, sample: %d, interval: %d\n", threads_max, gpu, width, height, max_faces, sample_size, interval); return nNum; @@ -208,7 +208,7 @@ return nNum; } - int sdkface::resize(const int w, const int h, const int chan){ + int sdkface::track_resize(const int w, const int h, const int chan){ THFT_Param tmpParam; tmpParam.nDeviceID = param.nDeviceID; tmpParam.nImageWidth = w; @@ -217,10 +217,9 @@ tmpParam.nSampleSize = param.nSampleSize; tmpParam.nDetectionIntervalFrame = param.nDetectionIntervalFrame; - auto flag = THFT_Reset(chan, &tmpParam); - printf("sdkface:: resize ret %d, chan %d size: %dx%d\n", flag, chan, w, h); + printf("##########resize track\n"); - return flag; + return THFT_Reset(chan, &tmpParam); } } // namespace cppface diff --git a/csrc/face.h b/csrc/face.h index b429684..d0b5233 100644 --- a/csrc/face.h +++ b/csrc/face.h @@ -33,7 +33,7 @@ int propertize(const cFacePos &pos, const cIMAGE *img, const int chan, void **res); int track(const cIMAGE *img, const int chan, void **fInfo, int *fcnt); - int resize(const int w, const int h, const int chan); + int track_resize(const int w, const int h, const int chan); private: VecFunc dtors_; diff --git a/goface.go b/goface.go index b584d4d..d5e2494 100644 --- a/goface.go +++ b/goface.go @@ -254,7 +254,7 @@ s.printLog("->face--> TrackerResize Failed, No Tracker Init") return false } - ret := C.resize(s.handle, C.int(w), C.int(h), C.int(ch)) + ret := C.track_resize(s.handle, C.int(w), C.int(h), C.int(ch)) if ret == 1 { return true } -- Gitblit v1.8.0