From b2c03b1615535dc717e196c560901e9e420c96d6 Mon Sep 17 00:00:00 2001
From: Tino Hager <tino.hager@nager.at>
Date: Sun, 24 Jun 2018 20:45:07 +0000
Subject: [PATCH] fix build error, add c# wrapper class
---
src/yolo_v2_class.hpp | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/yolo_v2_class.hpp b/src/yolo_v2_class.hpp
index fd00dc0..9875878 100644
--- a/src/yolo_v2_class.hpp
+++ b/src/yolo_v2_class.hpp
@@ -28,6 +28,11 @@
float *data; // pointer to the image data
};
+#define C_SHARP_MAX_OBJECTS 1000
+struct bbox_t_container {
+ bbox_t candidates[C_SHARP_MAX_OBJECTS];
+};
+
#ifdef __cplusplus
#include <memory>
#include <vector>
@@ -40,6 +45,12 @@
#include "opencv2/imgproc/imgproc_c.h" // C
#endif // OPENCV
+extern "C" YOLODLL_API int max_objects();
+extern "C" YOLODLL_API int init(const char *configurationFilename, const char *weightsFilename, int gpu);
+extern "C" YOLODLL_API int detect_image(const char *filename, bbox_t_container &container);
+extern "C" YOLODLL_API int detect_mat(const uint8_t* data, const size_t data_length, bbox_t_container &container);
+extern "C" YOLODLL_API int dispose();
+
class Detector {
std::shared_ptr<void> detector_gpu_ptr;
std::deque<std::vector<bbox_t>> prev_bbox_vec_deque;
--
Gitblit v1.10.0