From afcb649c8a2785c6095be5762c6077f9e15afd1a Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 02 八月 2017 10:33:31 +0800
Subject: [PATCH] c++ dupl image

---
 VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
index b0bb8e1..177b924 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
@@ -46,7 +46,7 @@
     cpu_sched();
 
 #ifdef USE_ST_SDK
-    PipeLine::register_global_elem_creator("PL_SensetimeFaceTrack", create_PL_SensetimeFaceTrack);
+    PipeLine::register_global_elem_creator("PL_SensetimeFaceTrackMitiTrd", create_PL_SensetimeFaceTrackMultiTrd);
 #endif
 
     for (size_t i = 0; i < CAMERA_COUNT; i++)
@@ -58,6 +58,8 @@
         g_CameraWrappers[i].pipeLineRender = new PipeLine;
         //PipeLine& pipeLine(*(g_CameraWrappers[i].pipeLineDecoderDetector));
     }
+
+    g_TeleWrapper.start();
 }
 
 void
@@ -334,8 +336,8 @@
         cameraWrapper.sftConfig.clamp_feature_rect = true;
         cameraWrapper.sftConfig.doTrackPerFrame = 1;
         //cameraWrapper.sftConfig.license_str = g_stface_license_str;
-        cameraWrapper.sftConfig.visionConeAngle = 35.0f;
-        cameraWrapper.sftConfig.score_min = 0.2f;
+        cameraWrapper.sftConfig.visionConeAngle = 30.0f;
+        cameraWrapper.sftConfig.score_min = 0.4f;
     }
 
 	cameraWrapper.fontPath = "/data/msyh.ttc";
@@ -790,13 +792,16 @@
     assert(cameraIdx > 0 && cameraIdx <= CAMERA_COUNT);
     cameraIdx -= 1;
     CameraWrapper &cameraWrapper(g_CameraWrappers[cameraIdx]);
+    const jchar* jchars = env->GetStringChars(label, nullptr);
+    std::wstring wstr;
+    int lenth = env->GetStringLength(label);
 
-    const char *utfChars = env->GetStringUTFChars(label, NULL);
-    std::string labelstr(utfChars);
-    std::wstring wlabelstr;
-    wlabelstr.assign(labelstr.begin(), labelstr.end());
-    env->ReleaseStringUTFChars(label, utfChars);
-    cameraWrapper.setFaceLabel(stTrackId, wlabelstr);
+    for (int i = 0; i < lenth; ++i) {
+        jchar jc = *(jchars + i);
+        wchar_t wt = (wchar_t)jc;
+        wstr.push_back(wt);
+    }
+    env->ReleaseStringChars(label,jchars);
+    cameraWrapper.setFaceLabel(stTrackId, wstr);
 }
-
 } // extern C

--
Gitblit v1.8.0