From a8ff93a0cf274795f0e9c3d66093f1c4c6ccf972 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期二, 19 十一月 2019 15:57:02 +0800
Subject: [PATCH] feat: add cloud plate sdk

---
 csdk.cpp |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/csdk.cpp b/csdk.cpp
index 5f128eb..02b15d6 100644
--- a/csdk.cpp
+++ b/csdk.cpp
@@ -103,15 +103,29 @@
 }
 
 // plateid api
-int c_api_plate_id_init(const int width, const int height, char *soPath) {
-    return init_plate_id_detector(width, height, soPath);
+int c_api_plate_id_init(const cPlateIDCfg *config, char *soPath) {
+    return init_plate_id_detector(config, soPath);
 }
 
-cPlateIDResult* c_api_plate_id_detect(int *plateIDCount, uchar*data, const int w, const int h) {
+cPlateIDResult* c_api_plate_id_detect(int *plateIDCount, uchar *data, const int w, const int h, const cRECT *rcDetect) {
     const cIMAGE img{data, w, h, 3};
-    return plate_id_detect(plateIDCount, &img);
+    return plate_id_detect(plateIDCount, &img, rcDetect);
 }
 
 int c_api_plate_id_free() {
     return uninit_plate_id_detector();
+}
+
+// plateid cloud sdk api
+int c_api_plate_id_cloud_init(const cPlateIDCloudSDKCfg *config, char *soPath, char *modelPath) {
+    return init_plate_id_cloud_sdk_detector(config, soPath, modelPath);
+}
+
+cPlateIDCloudSDKResult* c_api_plate_id_cloud_detect(int *plateIDCount, uchar *data, const int w, const int h, const cRECT *rcDetect) {
+    const cIMAGE img{data, w, h, 3};
+    return plate_id_cloud_sdk_detect(plateIDCount, &img, rcDetect);
+}
+
+void c_api_plate_id_cloud_free() {
+    uninit_plate_id_cloud_sdk_detector();
 }
\ No newline at end of file

--
Gitblit v1.8.0