#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 <RapidStructureApp/TriggerElement.h>
|
#include "TrackingTrigger.h"
|
#include "DBStruct.h"
|
|
class QSharedMemory;
|
|
class YoloRpcElement : public basic::PipeElement {
|
public:
|
YoloRpcElement(std::string shareMemoryName);
|
|
~YoloRpcElement();
|
|
void setImage(const cv::Mat &value);
|
|
cv::Mat getImage() const;
|
|
::YoloDetect::ObjInfos getObjects() const;
|
|
std::vector<ScoredRect> getLastScoreRects() const;
|
|
private:
|
virtual void threadFunc() override;
|
|
private:
|
IceRpcClient<YoloDetect::YoloDetectServerPrx> rpcClient;
|
cv::Mat image;
|
QSharedMemory *sharedMemory;
|
::YoloDetect::ObjInfos objs;
|
::YoloDetect::stringData cocoData;
|
std::vector<ScoredRect> triggerScoredRects;
|
TrackingTrigger *trackingTrigger;
|
|
};
|
|
#endif // YOLORPCELEMENT_H
|