From 642f9a5e963a54b6a00c6aa194bb8ef7cd087c0e Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期二, 10 十二月 2019 13:02:22 +0800
Subject: [PATCH] udpate

---
 goyolo.go |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/goyolo.go b/goyolo.go
index b7169bc..bd12ca1 100644
--- a/goyolo.go
+++ b/goyolo.go
@@ -68,8 +68,8 @@
 // RatioInterTrack 璺熻釜鍒ゆ柇閲嶅彔闃堝��
 const RatioInterTrack = 50 //璺熻釜鍒ゆ柇閲嶅彔闃堝��
 
-// NewYolo init yolo sdk
-func NewYolo(fc, fw, fn string, gi int) *YoloHandle {
+// NewSDKYolo init yolo sdk
+func NewSDKYolo(fc, fw, fn string, gi int) interface{} {
 
 	c := C.CString(fc)
 	defer C.free(unsafe.Pointer(c))
@@ -88,7 +88,8 @@
 }
 
 // Free free
-func Free(y *YoloHandle) {
+func Free(i interface{}) {
+	y := i.(*YoloHandle)
 	if y != nil {
 		if y.handle != nil {
 			C.release(y.handle)
@@ -126,7 +127,8 @@
 }
 
 // YoloObjName obj name by type
-func YoloObjName(y *YoloHandle, typ int) string {
+func YoloObjName(i interface{}, typ int) string {
+	y := i.(*YoloHandle)
 	p := C.obj_name_by_type(y.handle, C.int(typ))
 
 	return C.GoString(p)
@@ -216,10 +218,12 @@
 }
 
 // Run yolo detect   (鍙瘑鍒汉)
-func Run(y *YoloHandle, id string, data []byte, w, h, c int, thrsh float32, umns int) ([]byte, []byte) {
+func Run(i interface{}, id string, data []byte, w, h, c int, thrsh float32, umns int) ([]byte, []byte) {
 	if data == nil || w <= 0 || h <= 0 {
 		return nil, nil
 	}
+	y := i.(*YoloHandle)
+
 	channel := c
 	if channel == 0 {
 		channel = 3

--
Gitblit v1.8.0