派生自 development/c++

xuxiuxi
2019-03-08 c5b9ce0c0cf973575a936df3aa928d4b7a7fa7d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef YOLORPCELEMENT_H
#define YOLORPCELEMENT_H
 
#include <YoloServer.h>
#include <basic/pipe/PipeElement.h>
#include <basic/rpc/IceRpc.hpp>
#include <opencv2/opencv.hpp>
#include <basic/util/fastdfs/FastFds.hpp>
#include <TriggerElement.h>
//#include "../StructureApp/YoloRpcElement.h"
#include "../StructureApp/TrackingTrigger.h"
 
class QSharedMemory;
 
class YoloRpcElement : public basic::PipeElement {
public:
    YoloRpcElement(string);
 
    ~YoloRpcElement();
 
    void setImage(const cv::Mat &value);
 
    ::YoloDetect::ObjInfos getObjects() const;
 
    std::vector<cv::Mat> getTriggerMats();
 
    std::vector<ScoredRect> getLastScoreRects() const;
 
    void setFdfs(FastFdsWithLock *p_fdfsClient) {
        fdfsClient = p_fdfsClient;
    }
 
    bool getTriggerState() const;
 
    bool getTrigger() const;
 
private:
    virtual void threadFunc() override;
 
private:
    IceRpcClient<YoloDetect::YoloDetectServerPrx> rpcClient;
    cv::Mat image;
    QSharedMemory *sharedMemory;
    ::YoloDetect::ObjInfos objs;
    TrackingTrigger *trackingTrigger;
    std::vector<cv::Mat> triggerMats;
    ::YoloDetect::stringData cocoData;
    FastFdsWithLock *fdfsClient;
 
    TriggerElement m_triggerElement;
};
 
#endif // YOLORPCELEMENT_H