| | |
| | | #include <QtCore/QString> |
| | | #include <basic/util/app/AppUtil.h> |
| | | #include <basic/util/opencv/CvUtil.h> |
| | | #include <basic/util/app/AppPreference.hpp> |
| | | //diao用对应es数据封装的类 |
| | | //#include <basic/db/ES/es/ManagerEsDB.h> |
| | | #include <basic/db/Elasticsearch/EsDBTool.h> |
| | |
| | | #include <QtCore/QJsonObject> |
| | | #include <uuid/uuid.h> |
| | | #include <jsoncpp/json/json.h> |
| | | #include <basic/util/app/AppConfig.h> |
| | | |
| | | #define state "state" |
| | | |
| | | void StringReplace(string &strBase, string strSrc, string strDes) { |
| | |
| | | |
| | | //#在对比中添加特征值 |
| | | t_json["FaceFeature"] = "base64"; |
| | | t_json["personId"] = "wait todo";//关联底库人员id,人脸id |
| | | t_json["BaseName"] = "wait todo";//关联底库表名 |
| | | t_json["personId"] = "";//关联底库人员id,人脸id |
| | | t_json["BaseName"] = "";//关联底库表名 |
| | | //#end |
| | | // t_json["likePer"] = faceExtractQueueTmp[i].scoredRects[j].score;//人员相似度 Score |
| | | t_json["likeDate"] = AppUtil::getTimeSecString();//"2018-01-01 01:01:01";//比较时间 |
| | | |
| | | t_json["picName"] = "wait todo"; |
| | | t_json["picName"] = ""; |
| | | |
| | | |
| | | t_json["personPicUrl"] = "wait todo";//人员图片 store |
| | | t_json["personPicUrl"] = "";//人员图片 store |
| | | t_json["picAddress"] = getProperty("str_addr");//抓拍地址 |
| | | DBG("picAddress="<< t_json["picAddress"] ); |
| | | t_json["picMaxUrl"] = "wait todo";//大图路径 |
| | | t_json["picLocalUrl"] = "wait todo";//本地路径 |
| | | t_json["picMaxUrl"] = "";//大图路径 |
| | | t_json["picLocalUrl"] = "";//本地路径 |
| | | t_json["picSmUrl"] = strImgUrl;//人员抓小图 |
| | | //#todo |
| | | t_json["picDate"] = faceExtractQueueTmp[i].scoredRects[j].properties["time"]; |
| | |
| | | // DBG("timeC ::::B" << t_json["picDate"m_bIsMask].asString()); |
| | | // t_json["picDate"] = AppUtil::getTimeSecString(); |
| | | |
| | | t_json["content"] = "wait todo"; |
| | | t_json["viType"] = "1";//只有4种类型 1:personface 2:personbody 3:car 4:bicycle 5:none 未知类型 |
| | | t_json["content"] = ""; |
| | | //t_json["viType"] = "2";//只有4种类型 1:personface 2:personbody 3:car 4:bicycle 5:none 未知类型 |
| | | t_json["sdkType"] = std::to_string(m_sdkRule.nSdkType);//只有4种类型 1:personface 2:personbody 3:car 4:bicycle 5:none 未知类型 |
| | | t_json["personIsHub"] = "4";//1: 报警 2: 可疑 3: 安全 4: 未知 |
| | | |
| | | |
| | |
| | | t_json["Race"] = "";//检测的种族 应该为空 无检测结果 |
| | | t_json["videoIp"] = getProperty("local_ip");//当前服务器IP地址 |
| | | |
| | | t_json["cluster_id"] = appConfig.getStringProperty("clusterID");//集群id |
| | | t_json["ack_alarm"] = "0";//ack_alarm是否报警 |
| | | |
| | | //#todo 优化 get vector<string> from json |
| | | switch (atoi(faceExtractQueueTmp[i].scoredRects[j].properties["race"].c_str())) { |
| | | case 1: |
| | |
| | | t_json["indeviceid"] = appPref.getStringData("fxDevID"); |
| | | t_json["indevicename"] = appPref.getStringData("fxDevNAME"); |
| | | |
| | | std::string strImageKey = faceExtractQueueTmp[i].scoredRects[j].properties["imgKey"]; |
| | | INFO("SaveImageKey To ES: "<<strImageKey); |
| | | t_json["imgKey"] = strImageKey; |
| | | |
| | | auto faceSearchServer = faceSearchRpcClient.getServer(); |
| | | if (!faceSearchServer) { |
| | | ERR("faceSearchServer is null"); |