派生自 Algorithm/baseDetector

sunty
2022-03-21 d0a24896f95b4e060011852f80048ebfb0bf5f55
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
#include "class_detector.h"
#include "class_yolo_detector.hpp"
 
class Detector::Impl
{
public:
    Impl() {}
 
    ~Impl(){}
 
    YoloDectector _detector;
};
 
Detector::Detector()
{
    _impl = new Impl();
}
 
Detector::~Detector()
{
    if (_impl)
    {
        delete _impl;
        _impl = nullptr;
    }
}
 
void Detector::init(const Config &config)
{
        std::cout<<"------------------------>detector init"<<std::endl;
    _impl->_detector.init(config);
}
 
void Detector::detect(const std::vector<cv::Mat> &mat_image, std::vector<BatchResult> &vec_batch_result)
{
    _impl->_detector.detect(mat_image, vec_batch_result);
}