增加视频录取程序的RPC端口以及检测程序的RPC端口参数
| | |
| | | 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()) { |
| | |
| | | |
| | | 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; |
| | |
| | | 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()) { |
| | |
| | | |
| | | //} |
| | | 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), |
| | |
| | | // 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), |
| | |
| | | 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)) { |
| | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | // cv::imwrite(string1, image); |
| | | // } |
| | | if (feature.empty()) { |
| | | ERR("feature is empty"); |
| | | INFO("No Face Find: "<<getProperty("imgKey")); |
| | | continue; |
| | | } |
| | | features.clear(); |
| | |
| | | } |
| | | |
| | | void FaceRpcElement::threadFunc() { |
| | | INFO("MYH Run Here"); |
| | | // ClockTimer ct("FaceRpcElement::threadFunc"); |
| | | // { |
| | | // |
| | |
| | | // cv::imwrite(string1, image); |
| | | // } |
| | | if(!isInWeek(m_sdkRule.weekRuleVec)) |
| | | { |
| | | ERR("In Week"); |
| | | return; |
| | | } |
| | | triggerMats.clear(); |
| | | triggerFaces.clear(); |
| | | triggerScoredRects.clear(); |
| | |
| | | QPoint center = re.center(); |
| | | if(m_bIsMask && !mPolygon.containsPoint(center,Qt::OddEvenFill)) |
| | | { |
| | | ERR("m_bIsMask :"<<m_bIsMask) |
| | | return; |
| | | } |
| | | scoredRect.rect = {x, y, w, h}; |
| | |
| | | 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) { |
| | |
| | | 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")); |
| | | } |
| | |
| | | #include <map> |
| | | #include <list> |
| | | #include <opencv2/opencv.hpp> |
| | | #include <basic/util/app/AppPreference.hpp> |
| | | //#include <basic/pipe/TimerElement.h> |
| | | #include "YoloRpcElement.h" |
| | | #include <QSharedMemory> |
| | |
| | | |
| | | 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); |
| | |
| | | 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")); |
| | |
| | | #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> |
| | |
| | | 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(); |
| | |
| | | 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"); |
| | |
| | | //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); |