miyanhui
2019-02-18 8979b4ff45a551262f6ed6c81239e21de86b110e
增加视频录取程序的RPC端口以及检测程序的RPC端口参数
11个文件已修改
44 ■■■■ 已修改文件
QiaoJiaSystem/FaceDetectServer/FaceDetectServerI.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/FaceDetectServer/FaceExtractServerI.cpp 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/AppPipeController.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/FaceExtractElement.cpp 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/FaceRpcElement.cpp 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/PerimeterElement.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/PerimeterElement.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/VideoAnalysFromHC/main.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/VideoToImageMulth/main.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/FaceDetectServer/FaceDetectServerI.cpp
@@ -44,6 +44,7 @@
FaceDetect::Faces FaceDetectServerI::faceDetect(Ice::Int width, Ice::Int height, const std::string &shareMemoryName,
                                                const Ice::Current &) {
    ClockTimer ct("FaceDetectServerI::faceDetect");
    INFO("Face Detect");
    FaceDetect::Faces faces;
    QSharedMemory shareMemory(QString(shareMemoryName.c_str()));
    if (shareMemory.attach()) {
@@ -72,6 +73,7 @@
FaceDetect::ThftResult FaceDetectServerI::faceProperty(Ice::Int width, Ice::Int height, const FaceDetect::FacePos &pos,
                                                       const std::string &shareMemoryName, const Ice::Current &) {
    INFO("faceProperty");
    QSharedMemory shareMemory(QString(shareMemoryName.c_str()));
    if (shareMemory.attach()) {
        FaceDetect::ThftResult thftResult;
QiaoJiaSystem/FaceDetectServer/FaceExtractServerI.cpp
@@ -31,6 +31,7 @@
FaceDetect::Data FaceExtractServerI::faceExtract(Ice::Int width, Ice::Int height, const FaceDetect::FacePos &pos,
                                                 const std::string &shareMemoryName, const Ice::Current &) {
    ClockTimer ct("FaceExtractServerI::faceExtract");
    INFO("faceExtract");
    QSharedMemory shareMemory(QString(shareMemoryName.c_str()));
    FaceDetect::Data feature;
    if (shareMemory.attach()) {
QiaoJiaSystem/StructureApp/AppPipeController.cpp
@@ -19,7 +19,7 @@
//}
AppPipeController::AppPipeController(std::string folderPath, const SdkRuleMap &ruleMap) :
    m_rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"),
    m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp"),
    videoCaptureElement("filePath", 25, -1, appPref.getLongData("gpu.index")),
//    videoCaptureElement(40),
    m_index(0),
@@ -70,7 +70,7 @@
//    intKeepRight();
//}
AppPipeController::AppPipeController(std::string camId, const SdkRuleMap &ruleMap, bool RecordVideoEnable) :
    m_rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"),
    m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp"),
    videoCaptureElement(appPref.getStringData(camId + "rtsp"), 25, 3000, appPref.getLongData("gpu.index")),
//    videoCaptureElement(40),
    m_index(0),
QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
@@ -38,7 +38,7 @@
                        appPref.getIntData("faceSear.port"), "tcp"),
//    faceSearchRpcClient("faceCmServer", "", 10004, "tcp")
    m_sdkRule(rule),
    m_rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp")
    m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp")
{
    sharedMemory = new QSharedMemory(QString(shareMemoryName.c_str()));
    if (!sharedMemory->create(4608 * 2592 * 4)) {
@@ -62,10 +62,15 @@
}
void FaceExtractElement::timerFunc() {
    INFO("MYH Run Here");
    std::vector<FaceToExtract> faceExtractQueueTmp;
    {
        std::lock_guard<std::mutex> lg(imageQueueMutex);
        if (faceExtractQueue.empty())return;
        if (faceExtractQueue.empty())
        {
            ERR("faceExtractQueue.empty ");
            return;
        }
        faceExtractQueueTmp.swap(faceExtractQueue);
        faceExtractQueue.clear();
    }
@@ -101,7 +106,7 @@
//                    cv::imwrite(string1, image);
//                }
                if (feature.empty()) {
                    ERR("feature is empty");
                    INFO("No Face Find: "<<getProperty("imgKey"));
                    continue;
                }
                features.clear();
QiaoJiaSystem/StructureApp/FaceRpcElement.cpp
@@ -82,6 +82,7 @@
}
void FaceRpcElement::threadFunc() {
    INFO("MYH Run Here");
//    ClockTimer ct("FaceRpcElement::threadFunc");
//    {
//
@@ -89,7 +90,10 @@
//        cv::imwrite(string1, image);
//    }
    if(!isInWeek(m_sdkRule.weekRuleVec))
    {
        ERR("In Week");
        return;
    }
    triggerMats.clear();
    triggerFaces.clear();
    triggerScoredRects.clear();
@@ -110,6 +114,7 @@
            QPoint center = re.center();
            if(m_bIsMask && !mPolygon.containsPoint(center,Qt::OddEvenFill))
            {
                ERR("m_bIsMask :"<<m_bIsMask)
                return;
            }
            scoredRect.rect = {x, y, w, h};
@@ -132,9 +137,14 @@
                    CvUtil::zoomRectEqual(scoredRect.rect, 1.5, 1.5) & cv::Rect(0, 0, image.cols, image.rows)).clone());
                triggerScoredRects.push_back(trackingTrigger->getLastRect());
            } else {
                INFO("No Face Find: "<<getProperty("imgKey"));
//                DBG("trackingTrigger->triggerOnce(scoredRect) is false  ");
            }
        }
        if(faces.empty())
        {
            INFO("No Face Find: "<<getProperty("imgKey"));
        }
        trackingTrigger->triggerLine();
        //        DBG("faces.size  " << faces.size());
        if (getLastScoreRects().size() > 0) {
QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp
@@ -16,7 +16,7 @@
    m_bSetWH(false),
    pointArray(nullptr),
    npts(0),
    m_rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp")
    m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp")
{
    pManagerEsDB = new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort"));
}
QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.h
@@ -10,6 +10,7 @@
#include <map>
#include <list>
#include <opencv2/opencv.hpp>
#include <basic/util/app/AppPreference.hpp>
//#include <basic/pipe/TimerElement.h>
#include "YoloRpcElement.h"
#include <QSharedMemory>
@@ -54,7 +55,7 @@
class JudgmentRetrogradeTool  : public basic::PipeElement{
public:
    JudgmentRetrogradeTool():m_rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp") {}
    JudgmentRetrogradeTool():m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp") {}
    JudgmentRetrogradeTool(const SdkRule &rule);
    //JudgmentRetrogradeTool(const SdkRule &rule,SaveVideoRpcClient_t& rpcClient);
QiaoJiaSystem/StructureApp/PerimeterElement.cpp
@@ -25,7 +25,7 @@
    m_bIsMask(true),
    m_bSetWH(false),
    pointArray(nullptr),
    m_rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp")
    m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp")
{
    pManagerEsDB = new EsDBTool(appPref.getStringData("ipAdd"), appPref.getIntData("ipPort"));
QiaoJiaSystem/StructureApp/PerimeterElement.h
@@ -8,6 +8,7 @@
#include "TrackingTrigger.h"
#include <QJsonArray>
#include <RapidStructureApp/TriggerElement.h>
#include <basic/util/app/AppPreference.hpp>
#include <basic/util/fastdfs/FastFds.hpp>
#include "DBStruct.h"
#include <basic/db/Elasticsearch/EsDBTool.h>
@@ -16,7 +17,7 @@
class PerimeterElement : public basic::PipeElement
{
public:
    PerimeterElement():m_rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"){}
    PerimeterElement():m_rpcClient("RtspAnalysServer", "127.0.0.1",appPref.getIntData("RpcServerPort"),"tcp"){}
    PerimeterElement(const SdkRule& rule);
public:
    ~PerimeterElement();
QiaoJiaSystem/VideoAnalysFromHC/main.cpp
@@ -71,12 +71,13 @@
        ENABLEGLOG(GET_STR_CONFIG("logPath").c_str());
#endif
    appPref.setLongData("gpu.index", 1);
    appPref.setLongData("gpu.index", 0);
    appPref.setIntData("show.image", 0);
    //todo
    appPref.setIntData("CamStart", atoi(argv[1]));
    appPref.setIntData("CamStep", atoi(argv[2]));
    appPref.setIntData("RpcServerPort",atoi(argv[3]));
    //#todo get from config File
//    appPref.setStringData("ipAdd", "192.168.1.185");
QiaoJiaSystem/VideoToImageMulth/main.cpp
@@ -39,9 +39,10 @@
    //todo
    appPref.setIntData("CamStart", atoi(argv[1]));
    appPref.setIntData("CamStep", atoi(argv[2]));
    appPref.setIntData("RpcServerPort",atoi(argv[3]));
    appPref.setStringData("user.loop.absolute.path", appConfig.getStringProperty("cutPath"));
    IceRpcServer<RtspAnalysManager> server("RtspAnalysServer", 10009, "tcp");
    IceRpcServer<RtspAnalysManager> server("RtspAnalysServer",appPref.getIntData("RpcServerPort"), "tcp");
    server.setMessageSizeMax(1024 * 1024 * 50);
    server.setPoolInitSize(1);
    server.setPoolMaxSize(1);