From b8c5eb8048b566d632b25391a79ccbd6ce33c010 Mon Sep 17 00:00:00 2001
From: chenshijun <csj_sky@126.com>
Date: 星期六, 30 三月 2019 16:10:01 +0800
Subject: [PATCH] 1.3 增加nsq消息,解决进程重启
---
QiaoJiaSystem/StructureApp/PerStaticElement.cpp | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/QiaoJiaSystem/StructureApp/PerStaticElement.cpp b/QiaoJiaSystem/StructureApp/PerStaticElement.cpp
index 667bb9a..4d9f1d3 100644
--- a/QiaoJiaSystem/StructureApp/PerStaticElement.cpp
+++ b/QiaoJiaSystem/StructureApp/PerStaticElement.cpp
@@ -36,7 +36,7 @@
void PerStaticElement::threadInitial()
{
- setMask(m_sdkRule.strAreas.toStdString());
+// setMask(m_sdkRule.strAreas.toStdString());
}
@@ -175,14 +175,17 @@
int size=arrayAreas.size();
npts=size;
pointArray=new cv::Point2i[size];
+ float sizeW=(float)appPref.getIntData(m_sdkRule.strCamId.toStdString()+"width")/480;
+ float sizeH=(float)appPref.getIntData(m_sdkRule.strCamId.toStdString()+"height")/270;
for(int i = 0;i < arrayAreas.size();++i)
{
QJsonValue jsonValue = arrayAreas[i];
QJsonObject obj = jsonValue.toObject();
- int x = obj.value("x").toDouble()*4;
- int y = obj.value("y").toDouble()*4;
+ int x = obj.value("x").toDouble() *sizeW;
+ int y = obj.value("y").toDouble() *sizeH;
mPolygon<<(QPoint(x,y));
-
+ DBG("width="<<sizeW);
+ DBG("height="<<sizeH);
}
}
QJsonArray PerStaticElement::getJsonArrayFromQString(const QString& strJson)
@@ -266,7 +269,8 @@
t_json["videoIp"] = m_sdkRule.strAddr.toStdString(); // 璁惧ip
t_json["ack_alarm"]=m_triggerElement.getTriggerState()?"0":""; // que ren shi fou bao jing
t_json["cluster_id"]=appPref.getStringData("clusterID");; // ji qun id
-
+ t_json["imgKey"] = obj.properties["imgKey"];
+ INFO("SaveImgKeyToES: "<<obj.properties["imgKey"]);
bool retface = false;
if(pManagerEsDB)
retface = pManagerEsDB->insertData("personaction", "perVideoAction", t_json.toStyledString(), str_uuid);
@@ -300,4 +304,9 @@
{
value.copyTo(image);
+ if(!m_bSetWH)
+ {
+ setMask(m_sdkRule.strAreas.toStdString());
+ m_bSetWH=true;
+ }
}
--
Gitblit v1.8.0