From 8bfd4cc90f25f1800eb5e61d50d4fa74854e0f2a Mon Sep 17 00:00:00 2001
From: pansen <pansen626@sina.com>
Date: 星期一, 28 一月 2019 16:41:30 +0800
Subject: [PATCH] 布控上传修改
---
QiaoJiaSystem/StructureApp/PerStaticElement.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/QiaoJiaSystem/StructureApp/PerStaticElement.cpp b/QiaoJiaSystem/StructureApp/PerStaticElement.cpp
index 5d3de33..a8156c3 100644
--- a/QiaoJiaSystem/StructureApp/PerStaticElement.cpp
+++ b/QiaoJiaSystem/StructureApp/PerStaticElement.cpp
@@ -16,7 +16,8 @@
m_sdkRule(rule),
m_triggerElement(0,0),
m_lTime(AppUtil::getCurrentUs()),
-pManagerEsDB(nullptr)
+pManagerEsDB(nullptr),
+m_bIsMask(true)
{
pManagerEsDB=new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort"));
@@ -54,7 +55,7 @@
QRect rect(obj.rect.x,obj.rect.y,obj.rect.width,obj.rect.height);
QPoint center = rect.center();
- if(mPolygon.containsPoint(center,Qt::OddEvenFill))
+ if(mPolygon.containsPoint(center,Qt::OddEvenFill) || !m_bIsMask)
{
for(auto score:m_lastScoreRect)
{
@@ -79,7 +80,7 @@
{
if(ele.id==obj.id)
{
- if((obj.rect&ele.rect).area()>ele.rect.area()*0.8)
+ if((obj.rect&ele.rect).area()>ele.rect.area()*m_sdkRule.fSensitivity)
{
//not moving
obj.isMove = true;
@@ -102,9 +103,10 @@
//do temp memery
}
- m_lastScoreRect = mObjs;
+ // m_lastScoreRect = mObjs;
m_lTime =AppUtil::getCurrentUs();
}
+
m_lastScoreRect=mObjs;
m_triggerElement.triggerOnce();
@@ -144,6 +146,7 @@
QJsonArray arrayAreas = getJsonArrayFromQString(QString::fromStdString(mask));
if(arrayAreas.isEmpty())
{
+ m_bIsMask=false;
return;//do not detect
}
for(int i = 0;i < arrayAreas.size();++i)
@@ -180,7 +183,7 @@
CvUtil::cvMat2Buffer(image, buffer);
std::string strImgUrlTmp = "";
fdfsClient->fastFds->uploadFile(buffer, strImgUrlTmp, "jpg");
- strImgUrl.append(fdfsClient->fastFds->getIp() + "/" + strImgUrlTmp);
+ //strImgUrl.append(fdfsClient->fastFds->getIp() + "/" + strImgUrlTmp);
strImgUrl.clear();
strImgUrl = strImgUrlTmp;
// strImgUrl.append("/").append(strImgUrlTmp);
--
Gitblit v1.8.0