派生自 development/c++

pansen
2019-01-10 0436e5443295395025f89f0d091aab1e9551d1a4
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
#ifndef YOLODETECTSERVERI_H
#define YOLODETECTSERVERI_H
#define GPU
#include "YoloServer.h"
#include <thread>
#include <darknet.h>
#include <opencv2/opencv.hpp>
#include <basic/util/resource/ResourcesManager.h>
class YoloDetectServerI : public YoloDetect::YoloDetectServer
{
public:
    YoloDetectServerI();
    virtual ~YoloDetectServerI();
    // FaceDetectServer interface
public:
    virtual ::YoloDetect::ObjInfos YoloDetect(::Ice::Int, ::Ice::Int, const ::std::string&, const ::Ice::Current& = ::Ice::emptyCurrent)override;
    virtual YoloDetect::stringData getCocoData(const Ice::Current &) override;
private:
    network *m_net;
    float m_thresh;
    float m_hier_thresh;
    float m_nms;
    char **names;
    image **alphabet;
    bool m_bInitThd;
    std::thread m_thdInit;
 
  //  ResourcesManager<int> resourcesManager;
 
private:
 
    static int init(void* arg);
    image matToImg(cv::Mat& RefImg);
    cv::Mat bufferToMat(const int w,const int h,const int channels,const void* buffer);
 
 
};
 
 
#endif