From 53630c440d592792dcdd86f8d5b2c59da4f3c359 Mon Sep 17 00:00:00 2001
From: pans <pansen626@sina.com>
Date: 星期一, 28 一月 2019 20:35:35 +0800
Subject: [PATCH] Merge branch 'ywv1.2' into ywv1.2_布控feature
---
QiaoJiaSystem/StructureApp/PerimeterElement.h | 35 ++++++++++++++++++++++++-----------
1 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/QiaoJiaSystem/StructureApp/PerimeterElement.h b/QiaoJiaSystem/StructureApp/PerimeterElement.h
index b6fbd88..4a1d3fe 100644
--- a/QiaoJiaSystem/StructureApp/PerimeterElement.h
+++ b/QiaoJiaSystem/StructureApp/PerimeterElement.h
@@ -1,7 +1,6 @@
#ifndef PERIMETERELEMENT
#define PERIMETERELEMENT
#include <basic/pipe/PipeElement.h>
-#include <basic/event/EventHandler.hpp>
#include <opencv2/opencv.hpp>
#include <Ice/Ice.h>
#include <YoloServer.h>
@@ -10,17 +9,21 @@
#include <QJsonArray>
#include <RapidStructureApp/TriggerElement.h>
#include <basic/util/fastdfs/FastFds.hpp>
+#include "DBStruct.h"
+#include <basic/db/Elasticsearch/EsDBTool.h>
+#include "IntAreaCalcUtil.h"
class PerimeterElement : public basic::PipeElement
{
public:
- PerimeterElement(int alarm_people_num=1);
+ PerimeterElement(){}
+ PerimeterElement(const SdkRule& rule);
public:
~PerimeterElement();
//鏄惁鏈夌煩褰�
bool hasRects();
//璁剧疆ROI鍖哄煙
- void setMask(std::string mask);
+
void setImage(const cv::Mat &value);
@@ -46,7 +49,7 @@
void setFdfs(FastFdsWithLock *p_fdfsClient) {
fdfsClient = p_fdfsClient;
}
-
+ void setImage(const cv::Mat &value) const;
private:
@@ -59,24 +62,34 @@
std::string uploadImgToFdfs(cv::Mat& image);
- bool saveInfoToEs(const std::string& imgUrl,const ::YoloDetect::ObjInfo& obj);
-
-
-
+ bool saveInfoToEs(const std::string& imgUrl,const std::string& time);
+ void setMask(std::string mask);
+ bool isInWeek(const std::vector<LActRuleWeekRecord>& ruleWeek);
+ cv::Rect CutMask();
private:
cv::Mat image;
- cv::Mat mask;
+ //cv::Mat mask;
//vector<VPT_ObjInfo> vptResults;
::YoloDetect::ObjInfos m_objs;
- float sensitivity;
QPolygon mPolygon;
TrackingTrigger *trackingTrigger;
::YoloDetect::stringData cocoData;
int mRealNum;
- int m_nAlarmPeopleNum;
std::vector<ScoredRect> mObjs;
TriggerElement m_triggerElement;
FastFdsWithLock* fdfsClient;
+ SdkRule m_sdkRule;
+ EsDBTool* pManagerEsDB;
+
+
+ int npts;
+ std::vector<cv::Rect> m_recVec;
+
+ bool m_bIsMask;
+ std::vector<Point> poly1;
+ bool m_bSetWH;
+ cv::Point2i* pointArray;
+
};
#endif // PAELEMENT_H
--
Gitblit v1.8.0