#ifndef _cpp_yolo_h_ #define _cpp_yolo_h_ #include #include #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 names_; image_t *image_; int width_; int height_; int channel_; }; } // namespace cppyolo #endif