From 933cd15570f0dc6588a3a333799f4806c9dc835e Mon Sep 17 00:00:00 2001 From: pansen <pansen626@sina.com> Date: 星期四, 24 一月 2019 15:13:54 +0800 Subject: [PATCH] 布控相关接口,表结构变更。 --- QiaoJiaSystem/build/DataWebServer | 0 QiaoJiaSystem/DataManagerServer/http_configserver.cpp | 24 ++++++++++++++---------- QiaoJiaSystem/DataManagerServer/http_configserver.h | 4 ++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp index 9db378a..c2021bc 100644 --- a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp +++ b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp @@ -2129,13 +2129,15 @@ } for (auto &item : faceResults) { + //#todo 鍘婚噸 + feature_base64 = base64.Encode(item.feature.data(), item.feature.size()); int x = item.left; int y = item.top; int w = item.width; int h = item.height; cv::Rect t_rect = {x, y, w, h}; - auto t_image = image(CvUtil::zoomRect(t_rect, 1.5, 1.5) & cv::Rect(0, 0, image.cols, image.rows)).clone(); + auto t_image = image(CvUtil::zoomRect(t_rect, 2, 2) & cv::Rect(0, 0, image.cols, image.rows)).clone(); std::vector<uchar> buffer; cvutil.cvMat2Buffer(t_image, buffer); img_url = "http://"; @@ -2203,7 +2205,15 @@ if (UploadFlag == "1") { // #todo db queue upload to server - std::thread sendPerson(uploadPersonToServer, this, strUUID, img_url, idcard, feature_base64); + + std::string str_serIp = GET_STR_CONFIG("mainServerIp"); + std::string str_serPort = GET_STR_CONFIG("mainServerPort"); + +// string sendUrl = "192.168.1.203:3697/addPerson/uploadToTemporary"; + string sendUrl = str_serIp; + sendUrl.append(":").append(str_serPort).append("/addPerson/uploadToTemporary"); + + std::thread sendPerson(uploadPersonToServer, this, sendUrl, strUUID, img_url, idcard, feature_base64); sendPerson.detach(); } @@ -3105,9 +3115,8 @@ } } -void devHttpServer_c::uploadPersonToServer(devHttpServer_c *t_ptrThis, std::string parm_uuid, std::string parm_img_url, - std::string parm_idcard, - std::string parm_fea) { +void devHttpServer_c::uploadPersonToServer(devHttpServer_c *t_ptrThis, std::string sendUrl, std::string parm_uuid, + std::string parm_img_url, std::string parm_idcard, std::string parm_fea) { HttpRequestWithCrul m_requestWithCrul; Json::Value perInfos; Json::Value perInfo; @@ -3124,12 +3133,7 @@ perInfo["cardId"] = parm_idcard;//鍥剧墖鎻忚堪 perInfos.append(perInfo); - std::string str_serIp = GET_STR_CONFIG("mainServerIp"); - std::string str_serPort = GET_STR_CONFIG("mainServerPort"); -// string sendUrl = "192.168.1.203:3697/addPerson/uploadToTemporary"; - string sendUrl = str_serIp; - sendUrl.append(":").append(str_serPort).append("/addPerson/uploadToTemporary"); string postParams = perInfos.toStyledString(); string str_addRes; diff --git a/QiaoJiaSystem/DataManagerServer/http_configserver.h b/QiaoJiaSystem/DataManagerServer/http_configserver.h index 1aa90fb..b525670 100644 --- a/QiaoJiaSystem/DataManagerServer/http_configserver.h +++ b/QiaoJiaSystem/DataManagerServer/http_configserver.h @@ -183,8 +183,8 @@ qint64 getVideoTime(/*const std::string& videoPath*/std::string &str_tmpTime); - static void uploadPersonToServer(devHttpServer_c *t_ptrThis, std::string parm_uuid, std::string parm_img_url, - std::string parm_idcard, std::string parm_fea); + static void uploadPersonToServer(devHttpServer_c *t_ptrThis, std::string sendUrl, std::string parm_uuid, + std::string parm_img_url, std::string parm_idcard, std::string parm_fea); }; #endif diff --git a/QiaoJiaSystem/build/DataWebServer b/QiaoJiaSystem/build/DataWebServer index 95463c8..772dd3e 100755 --- a/QiaoJiaSystem/build/DataWebServer +++ b/QiaoJiaSystem/build/DataWebServer Binary files differ -- Gitblit v1.8.0