From 7d46d5ba219167f3a534f1bdd65ff03345c78c5c Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期一, 21 十月 2019 09:54:50 +0800 Subject: [PATCH] update --- csrc/buz/yolo/yolo.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/csrc/buz/yolo/yolo.h b/csrc/buz/yolo/yolo.h new file mode 100644 index 0000000..1a86e48 --- /dev/null +++ b/csrc/buz/yolo/yolo.h @@ -0,0 +1,41 @@ +#ifndef _sdk_yolo_h_ +#define _sdk_yolo_h_ + +#include <vector> +#include <string> + +struct _cObjInfo; +struct _cIMAGE; + +struct image_t; + +class Detector; + +namespace csdk_wrap{ + class sdkyolo{ + public: + sdkyolo(); + ~sdkyolo(); + public: + void* init_yolo(const char *cfg, const char *weights, const char *name, const int gi); + int yolo_detect(void *handle, const cIMAGE *img, const float thrsh, const bool use_mean, void **objs, int *objCount); + const char* yolo_obj_name_by_type(const int typ); + + private: + int buffer_to_image(const unsigned char *data, const int w, const int h, const int color_channel); + void objects_names_from_file(std::string filename); + private: + std::vector<std::string> names_; + std::vector<Detector*> detors_; + + cObjInfo *objInfo_; + int objCount_; + // image_t + image_t *image_; + int width_; + int height_; + int channel_; + }; +} + +#endif \ No newline at end of file -- Gitblit v1.8.0