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
| #ifndef _cpp_yolo_h_
| #define _cpp_yolo_h_
|
| #include <vector>
| #include <string>
|
| #include "struct.h"
|
| struct image_t;
|
| class Detector;
|
| namespace cppyolo
| {
| class sdkyolo{
|
| public:
| sdkyolo(const char *cfg, const char *weights, const char *name, const int gpu);
| ~sdkyolo();
|
| public:
| int detect(const cIMAGE *img, const float thrsh, const bool use_mean, void **objs, int *objCount);
| const char* obj_name_by_type(const int typ)const;
| private:
| bool init(const char *cfg, const char *weights, const char *name, const int gpu);
| int buffer_to_image(const unsigned char *data, const int w, const int h, const int color_channel);
|
| private:
| Detector *det_;
| cObjInfo *infos_;
| int obj_cnt_;
| std::vector<std::string> names_;
|
| image_t *image_;
| int width_;
| int height_;
| int channel_;
| };
| } // namespace cppyolo
|
|
| #endif
|
|