From abd9036f024a77d22b47a108bc88b27b9732e3c5 Mon Sep 17 00:00:00 2001
From: zhangjixing <775834166@qq.com>
Date: 星期二, 15 一月 2019 17:27:27 +0800
Subject: [PATCH] 

---
 QiaoJiaSystem/build/EncodeServer                      |    0 
 QiaoJiaSystem/build/RapidStructureApp                 |    0 
 QiaoJiaSystem/StructureApp/PerimeterElement.cpp       |   39 ++++++++++--
 QiaoJiaSystem/StructureApp/NewRecordVideoElement.h    |   11 ++-
 QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.h   |   11 ++-
 QiaoJiaSystem/StructureApp/AppPipeController.h        |    2 
 QiaoJiaSystem/build/DataWebServer                     |    0 
 QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp |    8 +-
 QiaoJiaSystem/StructureApp/FaceExtractElement.h       |    2 
 QiaoJiaSystem/StructureApp/PerimeterElement.h         |    3 +
 QiaoJiaSystem/build/RecordVideo                       |    0 
 QiaoJiaSystem/build/scpToSer.sh                       |    4 
 QiaoJiaSystem/StructureApp/ImageDrawElement.cpp       |    2 
 QiaoJiaSystem/StructureApp/FaceRpcElement.cpp         |    6 +
 QiaoJiaSystem/StructureApp/PerStaticElement.cpp       |    9 ++-
 QiaoJiaSystem/build/RapidStructureAppRtsp             |    0 
 QiaoJiaSystem/StructureApp/AppPipeController.cpp      |   31 ++++++----
 QiaoJiaSystem/StructureApp/NewRecordVideoElement.cpp  |   26 +++++---
 QiaoJiaSystem/StructureApp/FaceRpcElement.h           |    1 
 QiaoJiaSystem/DataManagerServer/http_configserver.cpp |   15 ++--
 QiaoJiaSystem/build/VideoAnalysFromHC                 |    0 
 QiaoJiaSystem/build/config.db                         |    0 
 QiaoJiaSystem/StructureApp/PerStaticElement.h         |    1 
 QiaoJiaSystem/StructureApp/FaceExtractElement.cpp     |    5 +
 QiaoJiaSystem/build/StructureApp                      |    0 
 25 files changed, 114 insertions(+), 62 deletions(-)

diff --git a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
index 67e82a4..0a84722 100644
--- a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
+++ b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
@@ -1087,13 +1087,14 @@
         runAllApp();
     }
     //edit camera's sdks
-//    else/* if ((rec_sdk_old.str_sdks != rec_sdk.str_sdks) ||
-//             (rec_sdk_old.str_det_thr != rec_sdk.str_det_thr) ||
-//             (rec_sdk_old.str_cmp_thr != rec_sdk.str_cmp_thr)) */{
-//        killVideoAnalysFromHCApp();
-//        sleep(1);
-//        runAllApp();
-//    }
+    else/* if ((rec_sdk_old.str_sdks != rec_sdk.str_sdks) ||
+             (rec_sdk_old.str_det_thr != rec_sdk.str_det_thr) ||
+             (rec_sdk_old.str_cmp_thr != rec_sdk.str_cmp_thr)) */
+    {
+        killVideoAnalysFromHCApp();
+        sleep(1);
+        runAllApp();
+    }
 
     Json::Value value_out;
     value_out["str_cam_dev_id"] = rec.str_cam_dev_id.toStdString();
diff --git a/QiaoJiaSystem/StructureApp/AppPipeController.cpp b/QiaoJiaSystem/StructureApp/AppPipeController.cpp
index db11a0c..321f170 100644
--- a/QiaoJiaSystem/StructureApp/AppPipeController.cpp
+++ b/QiaoJiaSystem/StructureApp/AppPipeController.cpp
@@ -192,7 +192,7 @@
     //  int max=appPref.getIntData("n_cut_max_duration");
     // recordInit(40,100);
     videoCaptureElement.registerConnector([&] {
-
+        mutex.lock();
         cv::Mat imageTemp = videoCaptureElement.getImage();
 
         std::string strNewTime;
@@ -206,7 +206,7 @@
             if (bRecordVideoEnable) {
                 newRecordVideoElement.pushImgBuf(strNewTime, imageTemp);
                 newRecordVideoElement.setSdkTrigger(faceRpcElement.getTriggerState() ||//TODO
-                                                    personElement.getTrigger() ||
+                                                    personElement.getTriggerState() ||
                                                     leftJudgment.getTriggerState() ||
                                                     rightJudgment.getTriggerState() ||
                                                     perimeterElement.getTriggerState() ||
@@ -214,7 +214,6 @@
                                                     perHubElement.getTriggerState() ||
                                                     perStaticElement.getTriggerState()
                 );
-
 
             }
 
@@ -253,10 +252,10 @@
             imageDrawElement.setImage(imageTemp);
             imageDrawElement.submit();
         }
-
-        if (bRecordVideoEnable) {
-            registerElement(triggerElement);
-        }
+        mutex.unlock();
+//        if (bRecordVideoEnable) {
+//            registerElement(triggerElement);
+//        }
     });
 
 
@@ -303,7 +302,7 @@
         registerElement(faceExtractElement);
     }
     registerElement(imageDrawElement);
-    registerElement(newRecordVideoElement);
+   // registerElement(newRecordVideoElement);
     videoCaptureElement.setOutPutInterval(3);
     faceExtractElement.setProperty("index", to_string(m_index));
     registerElement(yoloRpcElement);
@@ -437,10 +436,18 @@
     leftJudgment.init(rule.strAreas, rule.strLine);
     rightJudgment.init(rule.strExAreas, rule.strExLine);
     yoloRpcElement.registerConnector([&] {
-        leftJudgment.setYoloObjects(yoloRpcElement.getLastScoreRects());
-        rightJudgment.setYoloObjects(yoloRpcElement.getLastScoreRects());
-        leftJudgment.setImage(yoloRpcElement.getImage());
-        rightJudgment.setImage(yoloRpcElement.getImage());
+        if(!leftJudgment.isBusy())
+        {
+             leftJudgment.setYoloObjects(yoloRpcElement.getLastScoreRects());
+              leftJudgment.setImage(yoloRpcElement.getImage());
+        }
+        if(!rightJudgment.isBusy())
+        {
+            rightJudgment.setYoloObjects(yoloRpcElement.getLastScoreRects());
+
+            rightJudgment.setImage(yoloRpcElement.getImage());
+        }
+
     });
     registerElement(leftJudgment);
     registerElement(rightJudgment);
diff --git a/QiaoJiaSystem/StructureApp/AppPipeController.h b/QiaoJiaSystem/StructureApp/AppPipeController.h
index e617143..9e031af 100644
--- a/QiaoJiaSystem/StructureApp/AppPipeController.h
+++ b/QiaoJiaSystem/StructureApp/AppPipeController.h
@@ -109,7 +109,7 @@
     SdkRuleMap m_sdkRuleMap;
     std::string m_localIp;
     std::string getFullFileName();
-
+    std::mutex mutex;
 };
 
 #endif // APPPIPECONTROLLER_H
diff --git a/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp b/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
index 00f910d..64aac57 100644
--- a/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
+++ b/QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
@@ -34,7 +34,8 @@
     faceSearchRpcClient(appPref.getStringData("faceSear.proxy"), appPref.getStringData("faceSear.ip"),
                         appPref.getIntData("faceSear.port"), "tcp"),
 //    faceSearchRpcClient("faceCmServer", "", 10004, "tcp")
-    m_sdkRule(rule) {
+    m_sdkRule(rule)
+{
     sharedMemory = new QSharedMemory(QString(shareMemoryName.c_str()));
     if (!sharedMemory->create(4608 * 2592 * 4)) {
         sharedMemory->attach();
@@ -148,7 +149,7 @@
                 //#todo
                 t_json["picDate"] = faceExtractQueueTmp[i].scoredRects[j].properties["time"];
                 DBG("picDate=" << t_json["picDate"].asString());
-//                DBG("timeC ::::B" << t_json["picDate"].asString());
+//                DBG("timeC ::::B" << t_json["picDate"m_bIsMask].asString());
 //                t_json["picDate"] = AppUtil::getTimeSecString();
 
                 t_json["content"] = "wait todo";
diff --git a/QiaoJiaSystem/StructureApp/FaceExtractElement.h b/QiaoJiaSystem/StructureApp/FaceExtractElement.h
index f9f7d2b..5519735 100644
--- a/QiaoJiaSystem/StructureApp/FaceExtractElement.h
+++ b/QiaoJiaSystem/StructureApp/FaceExtractElement.h
@@ -1,4 +1,4 @@
-#ifndef FACEEXTRACTELEMENT_H
+锘�#ifndef FACEEXTRACTELEMENT_H
 #define FACEEXTRACTELEMENT_H
 
 #include <FaceServer.h>
diff --git a/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp b/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp
index 1e5553a..5399c59 100644
--- a/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp
+++ b/QiaoJiaSystem/StructureApp/FaceRpcElement.cpp
@@ -38,7 +38,8 @@
 //    rpcClient("faceServer","",10002,"tcp"),
     sharedMemory(nullptr),
     trackingTrigger(nullptr),
-    m_sdkRule(rule)
+    m_sdkRule(rule),
+    m_bIsMask(true)
 {
     sharedMemory = new QSharedMemory(QString(shareMemoryName.c_str()));
     if (!sharedMemory->create(4608 * 2592 * 4)) {
@@ -106,7 +107,7 @@
             int h = face.rcFace.bottom - face.rcFace.top;
             QRect re(x,y,w,h);
             QPoint center = re.center();
-            if(!mPolygon.containsPoint(center,Qt::OddEvenFill))
+            if(m_bIsMask && !mPolygon.containsPoint(center,Qt::OddEvenFill))
             {
                 return;
             }
@@ -186,6 +187,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)
diff --git a/QiaoJiaSystem/StructureApp/FaceRpcElement.h b/QiaoJiaSystem/StructureApp/FaceRpcElement.h
index deec82f..bb12780 100644
--- a/QiaoJiaSystem/StructureApp/FaceRpcElement.h
+++ b/QiaoJiaSystem/StructureApp/FaceRpcElement.h
@@ -53,6 +53,7 @@
     QPolygon mPolygon;
     TriggerElement m_triggerElement;
     SdkRule m_sdkRule;
+    bool m_bIsMask;
 };
 
 #endif // FACERPCELEMENT_H
diff --git a/QiaoJiaSystem/StructureApp/ImageDrawElement.cpp b/QiaoJiaSystem/StructureApp/ImageDrawElement.cpp
index 44a0088..56879f9 100644
--- a/QiaoJiaSystem/StructureApp/ImageDrawElement.cpp
+++ b/QiaoJiaSystem/StructureApp/ImageDrawElement.cpp
@@ -25,6 +25,8 @@
 
     for (auto yoloObj: yoloObjectsData) {
         auto rect = CvUtil::zoomRect(yoloObj.rect, 1, 1);
+        //[{"x":1.5999756,"y":82.533325},{"x":1.5999756,"y":180.53333},{"x":61.599976,"y":175.53333},{"x":63.599976,"y":66.533325}]
+        //cv::rectangle(image, cv::Rect(4,328,252,480 ), cv::Scalar(0, 0, 255), 2);
         cv::rectangle(image, rect, yoloObj.id >= 0 ? cv::Scalar(255, 0, 0) : cv::Scalar(0, 255, 255), 2);
         int i = 0;
         for (auto &property:yoloObj.properties) {
diff --git a/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp b/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp
index 49af467..9c6cda9 100644
--- a/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp
+++ b/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp
@@ -10,10 +10,10 @@
 #include <basic/util/app/AppPreference.hpp>
 
 JudgmentRetrogradeTool::JudgmentRetrogradeTool(const SdkRule &rule) :
-    TimerElement(1000),
     m_triggerElement(rule.nTriggerDelay * 8, 0),
     m_sdkRule(rule),
-    pManagerEsDB(nullptr) {
+    pManagerEsDB(nullptr)
+{
     pManagerEsDB = new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort"));
 }
 
@@ -29,7 +29,7 @@
     //#todo string ->json
     QJsonArray arrayAreas = getJsonArrayFromQString(area);
     if (arrayAreas.isEmpty()) {
-        return false;//do not detect
+        return false;
     }
     QVector<QPoint> vec;
     for (int i = 0; i < arrayAreas.size(); ++i) {
@@ -137,7 +137,7 @@
     return JRTOOL::getAngelOfTwoVector(directionVectorPoint, point);
 }
 
-void JudgmentRetrogradeTool::timerFunc() {
+void JudgmentRetrogradeTool::threadFunc() {
     func();
     fireConnectors();
 }
diff --git a/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.h b/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.h
index 956c7ad..9988245 100644
--- a/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.h
+++ b/QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.h
@@ -9,7 +9,7 @@
 #include <map>
 #include <list>
 #include <opencv2/opencv.hpp>
-#include <basic/pipe/TimerElement.h>
+//#include <basic/pipe/TimerElement.h>
 #include "YoloRpcElement.h"
 #include <QSharedMemory>
 #include <QString>
@@ -20,7 +20,7 @@
 #include "DBStruct.h"
 #include <basic/db/Elasticsearch/EsDBTool.h>
 #include <jsoncpp/json/json.h>
-
+#include <basic/pipe/PipeElement.h>
 struct VectorPoint {
     cv::Point2f start_Point;
     cv::Point2f end_Point;
@@ -51,9 +51,9 @@
 }
 
 
-class JudgmentRetrogradeTool : public TimerElement {
+class JudgmentRetrogradeTool  : public basic::PipeElement{
 public:
-    JudgmentRetrogradeTool() : TimerElement(1000) {}
+    JudgmentRetrogradeTool() {}
 
     JudgmentRetrogradeTool(const SdkRule &rule);
 
@@ -105,7 +105,8 @@
 
 private:
     //    virtual void threadInitial() override;
-    virtual void timerFunc() override;
+       virtual void threadFunc()override;
+   // virtual void timerFunc() override;
     //    virtual void threadClosing()override;
 
 private:
diff --git a/QiaoJiaSystem/StructureApp/NewRecordVideoElement.cpp b/QiaoJiaSystem/StructureApp/NewRecordVideoElement.cpp
index 0ba53a9..6897343 100644
--- a/QiaoJiaSystem/StructureApp/NewRecordVideoElement.cpp
+++ b/QiaoJiaSystem/StructureApp/NewRecordVideoElement.cpp
@@ -9,6 +9,7 @@
 {
 
    // basicPath();
+    isRecord=false;
     m_cutPath= appPref.getStringData("user.loop.absolute.path");
 
      recordInit(appPref.getIntData("n_cut_min_duration"),appPref.getIntData("n_cut_max_duration"));
@@ -24,6 +25,7 @@
 std::string NewRecordVideoElement::startRecord() {
 
 //    ImgInfo info=m_HiredisTool.getImage(camID);
+     //isRecord=true;
      ImgInfo info;
      getImg(info);
     std::string srcPath= getFileName(info.time);
@@ -45,6 +47,7 @@
 //    DBG("sdkTrigger:" << sdkTrigger);
     m_hiredisTool.pushImageBuf(m_filename,info.img);
     m_hiredisTool.addFileInfo(m_filename,RECORD_ENDING);
+   // isRecord=false;
 }
 
 void NewRecordVideoElement::doRecord() {
@@ -99,6 +102,8 @@
 //     info.img=img;
      info.time=time;
      m_imgBufQue.push(info);
+    // if(isRecord)
+    // DBG("camId="<<camID<<"pushtime="<<info.time);
 //     int size=m_imgBufQue.size();
 //     DBG("m_imgBufQue size="<<size);
 }
@@ -111,19 +116,20 @@
         {
              m_imgBufQue.pop();
         }
-
-
-
- }
- void NewRecordVideoElement::threadFunc()
- {
-//        Record();
- }
- void NewRecordVideoElement::threadInitial()
- {
+//        if(isRecord)
+//        DBG("camId="<<camID<<"gettime="<<info.time);
 
 
  }
+// void NewRecordVideoElement::threadFunc()
+// {
+//       Record();
+// }
+// void NewRecordVideoElement::threadInitial()
+// {
+
+
+// }
 
  void NewRecordVideoElement::Record() {
      switch(recordStatus)
diff --git a/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h b/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h
index 17a40f9..dc35006 100644
--- a/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h
+++ b/QiaoJiaSystem/StructureApp/NewRecordVideoElement.h
@@ -1,6 +1,6 @@
 #ifndef NEWRECORDVIDEOELEMENT_H
 #define NEWRECORDVIDEOELEMENT_H
-#include <basic/pipe/PipeElement.h>
+//#include <basic/pipe/PipeElement.h>
 #include <basic/pipe_element/ffmpeg/FfmpegElement.h>
 #include "HiredisTool.h"
 //struct ImgInfo
@@ -8,7 +8,7 @@
 //    std::string time;
 //    cv::Mat img;
 //};
-class NewRecordVideoElement : public basic::PipeElement{
+class NewRecordVideoElement {
 
 public:
 
@@ -20,9 +20,9 @@
     void setSdkTrigger(bool isTrigger);
     void pushImgBuf(const std::string& time,cv::Mat& img);
 
-private:
-    virtual void threadFunc() override;
-    virtual void threadInitial() override;
+//private:
+//    virtual void threadFunc() override;
+//    virtual void threadInitial() override;
 private:
     void recordInit(int videoMin, int videoMax);
     void Record();
@@ -53,6 +53,7 @@
     std::queue<ImgInfo> m_imgBufQue;
     HiredisTool m_hiredisTool;
     std::string m_filename;
+    bool isRecord;
 };
 
 #endif // RECORDVIDEOELEMENT_H
diff --git a/QiaoJiaSystem/StructureApp/PerStaticElement.cpp b/QiaoJiaSystem/StructureApp/PerStaticElement.cpp
index 5d3de33..4877fbe 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)
                 {
@@ -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)
diff --git a/QiaoJiaSystem/StructureApp/PerStaticElement.h b/QiaoJiaSystem/StructureApp/PerStaticElement.h
index d6c21a7..edb88b8 100644
--- a/QiaoJiaSystem/StructureApp/PerStaticElement.h
+++ b/QiaoJiaSystem/StructureApp/PerStaticElement.h
@@ -79,6 +79,7 @@
     std::vector<ScoredRect> m_lastScoreRect;
     unsigned long long m_lTime;
     EsDBTool* pManagerEsDB;
+    bool m_bIsMask;
 };
 
 #endif // PAELEMENT_H
diff --git a/QiaoJiaSystem/StructureApp/PerimeterElement.cpp b/QiaoJiaSystem/StructureApp/PerimeterElement.cpp
index 35ff6e8..5e480ee 100644
--- a/QiaoJiaSystem/StructureApp/PerimeterElement.cpp
+++ b/QiaoJiaSystem/StructureApp/PerimeterElement.cpp
@@ -20,7 +20,8 @@
     mRealNum(0),
     m_triggerElement(rule.nTriggerDelay*8,0),
     pManagerEsDB(nullptr),
-    npts(0) {
+    m_bIsMask(true)
+{
 
     pManagerEsDB = new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort"));
 }
@@ -56,7 +57,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) {
             m_recVec.push_back(obj.rect);
             if (picDate.empty()) {
                 picDate = obj.properties["time"];
@@ -67,6 +68,10 @@
             num++;
 
 
+        }
+        else
+        {
+           // DBG("id="<< obj.properties["id"]<<" no containts x="<<rect.center().x()<<" y="<<rect.center().y());
         }
 
 
@@ -120,17 +125,30 @@
     //  DBG("imgUrl="<<imgUrl);
     if (m_triggerElement.getTriggerState() && num!=mRealNum)
     {
-        auto t_image = image(CutMask()).clone();
+
+        cv::Mat t_image = image(CutMask()).clone();
+        if(t_image.empty())
+        {
+            if(image.empty())
+            {
+                  DBG("image empty");
+            }
+            DBG("t_image empty");
+            return;
+        }
         std::string imgUrl = uploadImgToFdfs(t_image);
         saveInfoToEs(imgUrl, picDate);
         DBG("num=" << num << " lastnum=" << mRealNum);
-
+        mRealNum = num;
     }
-    //if(state)
-   // DBG("num=" << num <<"m_triggerElement.getTriggerState()="<<m_triggerElement.getTriggerState());
+//    if(state)
+//DBG("mRealNum=" << mRealNum <<"m_triggerElement.getTriggerState()="<<m_triggerElement.getTriggerState());
 
 
-   mRealNum = num;
+    if(!state)
+    {
+        mRealNum = num;
+    }
 
 
     // DBG("m_sdkRule.nSdkType="<<m_sdkRule.nSdkType<<" num="<<num);
@@ -169,7 +187,8 @@
 
 void PerimeterElement::setMask(std::string mask) {
     QJsonArray arrayAreas = getJsonArrayFromQString(QString::fromStdString(mask));
-    if (arrayAreas.isEmpty()) {
+    if (arrayAreas.isEmpty() && m_sdkRule.nSdkType != PerimeterSdk) {
+        m_bIsMask=false;
         return;//do not detect
     }
     int size = arrayAreas.size();
@@ -347,3 +366,7 @@
 //   DBG("RECT x="<<rect.x<<"y"<<rect.y<<"w"<<rect.width<<"h"<<rect.height);
     return rect;
 }
+bool PerimeterElement::isAnd()
+{
+
+}
diff --git a/QiaoJiaSystem/StructureApp/PerimeterElement.h b/QiaoJiaSystem/StructureApp/PerimeterElement.h
index 685677e..b7a4dfd 100644
--- a/QiaoJiaSystem/StructureApp/PerimeterElement.h
+++ b/QiaoJiaSystem/StructureApp/PerimeterElement.h
@@ -65,6 +65,7 @@
     void setMask(std::string mask);
     bool isInWeek(const std::vector<LActRuleWeekRecord>& ruleWeek);
     cv::Rect CutMask();
+    bool isAnd();
 private:
     cv::Mat image;
     //cv::Mat mask;
@@ -83,6 +84,8 @@
 
    int npts;
    vector<cv::Rect> m_recVec;
+
+   bool m_bIsMask;
 };
 
 #endif // PAELEMENT_H
diff --git a/QiaoJiaSystem/build/DataWebServer b/QiaoJiaSystem/build/DataWebServer
index 4ba569c..3b246c1 100755
--- a/QiaoJiaSystem/build/DataWebServer
+++ b/QiaoJiaSystem/build/DataWebServer
Binary files differ
diff --git a/QiaoJiaSystem/build/EncodeServer b/QiaoJiaSystem/build/EncodeServer
index 59c0dd0..b289e10 100755
--- a/QiaoJiaSystem/build/EncodeServer
+++ b/QiaoJiaSystem/build/EncodeServer
Binary files differ
diff --git a/QiaoJiaSystem/build/RapidStructureApp b/QiaoJiaSystem/build/RapidStructureApp
index 39d29b2..9a972e5 100755
--- a/QiaoJiaSystem/build/RapidStructureApp
+++ b/QiaoJiaSystem/build/RapidStructureApp
Binary files differ
diff --git a/QiaoJiaSystem/build/RapidStructureAppRtsp b/QiaoJiaSystem/build/RapidStructureAppRtsp
index e99043b..1e5921c 100755
--- a/QiaoJiaSystem/build/RapidStructureAppRtsp
+++ b/QiaoJiaSystem/build/RapidStructureAppRtsp
Binary files differ
diff --git a/QiaoJiaSystem/build/RecordVideo b/QiaoJiaSystem/build/RecordVideo
index 3663e73..62d159a 100755
--- a/QiaoJiaSystem/build/RecordVideo
+++ b/QiaoJiaSystem/build/RecordVideo
Binary files differ
diff --git a/QiaoJiaSystem/build/StructureApp b/QiaoJiaSystem/build/StructureApp
index ac2d973..fe02b93 100755
--- a/QiaoJiaSystem/build/StructureApp
+++ b/QiaoJiaSystem/build/StructureApp
Binary files differ
diff --git a/QiaoJiaSystem/build/VideoAnalysFromHC b/QiaoJiaSystem/build/VideoAnalysFromHC
index cb2375c..51db0de 100755
--- a/QiaoJiaSystem/build/VideoAnalysFromHC
+++ b/QiaoJiaSystem/build/VideoAnalysFromHC
Binary files differ
diff --git a/QiaoJiaSystem/build/config.db b/QiaoJiaSystem/build/config.db
index 662b88f..32de39c 100755
--- a/QiaoJiaSystem/build/config.db
+++ b/QiaoJiaSystem/build/config.db
Binary files differ
diff --git a/QiaoJiaSystem/build/scpToSer.sh b/QiaoJiaSystem/build/scpToSer.sh
index 4dcb35e..cb570db 100644
--- a/QiaoJiaSystem/build/scpToSer.sh
+++ b/QiaoJiaSystem/build/scpToSer.sh
@@ -2,7 +2,7 @@
 
 CUR_PATH=`pwd`
 #echo  ${CUR_PATH}"/"${SENDFILE}
-#scp ${CUR_PATH}"/"${SENDFILE} basic@192.168.1.185:/home/basic/Apps/QiaoJiaSystem/build
+#scp ${CUR_PATH}"/"${SENDFILE} basic@192.168.1.203:/home/basic/Apps/QiaoJiaSystem/build
 
 
 sendFile() {
@@ -10,7 +10,7 @@
     des_pass=123
     expect -c "
 #    spawn scp -P44100 ${CUR_PATH}"/"$1 dell@58.118.225.79:/home/dell/Apps/QiaoJiaSystem/build 
-    spawn scp  ${CUR_PATH}"/"$1 basic@192.168.1.182:/home/basic/Apps/QiaoJiaSystem/build 
+    spawn scp  ${CUR_PATH}"/"$1 basic@192.168.1.203:/home/basic/Apps/QiaoJiaSystem/build 
     expect \"password:\"
     send \"${des_pass}\r\"
     expect eof

--
Gitblit v1.8.0