From 4ad008ef781f02bfd65fc3e71d3917959fcaca74 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期二, 10 十二月 2019 11:33:00 +0800
Subject: [PATCH] update

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

diff --git a/goyolo.go b/goyolo.go
index 0c2687b..4d90dc0 100644
--- a/goyolo.go
+++ b/goyolo.go
@@ -96,7 +96,7 @@
 }
 
 // Free free
-func (y *YoloHandle) Free() {
+func Free(y *YoloHandle) {
 	if y != nil {
 		if y.handle != nil {
 			C.release(y.handle)
@@ -117,7 +117,7 @@
 }
 
 // YoloDetect yolo detect
-func (y *YoloHandle) YoloDetect(data []byte, w, h, c int, thrsh float32, umns int) []CObjInfo {
+func YoloDetect(y *YoloHandle, data []byte, w, h, c int, thrsh float32, umns int) []CObjInfo {
 
 	var count C.int
 	var cobjinfo unsafe.Pointer
@@ -134,7 +134,7 @@
 }
 
 // YoloObjName obj name by type
-func (y *YoloHandle) YoloObjName(typ int) string {
+func YoloObjName(y *YoloHandle, typ int) string {
 	p := C.obj_name_by_type(y.handle, C.int(typ))
 
 	return C.GoString(p)
@@ -182,11 +182,11 @@
 }
 
 // YoloDetectTrack2 yolo detect   (鍙瘑鍒汉)
-func (y *YoloHandle) YoloDetectTrack2(LastYoloObjs []CObjTrackInfo, LastTrackID *uint64, data []byte, w, h, c int, thrsh float32, umns int) (allObjs []CObjTrackInfo, newObjs []CObjTrackInfo) {
+func YoloDetectTrack2(y *YoloHandle, LastYoloObjs []CObjTrackInfo, LastTrackID *uint64, data []byte, w, h, c int, thrsh float32, umns int) (allObjs []CObjTrackInfo, newObjs []CObjTrackInfo) {
 
 	var tmp CObjTrackInfo
 	//LastYoloObjs
-	detectObjs := y.YoloDetect(data, w, h, c, thrsh, umns)
+	detectObjs := YoloDetect(y, data, w, h, c, thrsh, umns)
 
 	for _, vLast := range LastYoloObjs {
 		for i := 0; i < len(detectObjs); i++ {
@@ -253,7 +253,7 @@
 }
 
 // YoloDetectTrack yolo detect   (鍙瘑鍒汉)
-func (y *YoloHandle) YoloDetectTrack(id string, data []byte, w, h, c int, thrsh float32, umns int) ([]byte, []byte) {
+func YoloDetectTrack(y *YoloHandle, id string, data []byte, w, h, c int, thrsh float32, umns int) ([]byte, []byte) {
 
 	v, ok := y.tracker[id]
 	if !ok {
@@ -261,7 +261,7 @@
 		y.tracker[id] = i
 		v = i
 	}
-	whole, recent := y.YoloDetectTrack2(v.lastTrackObjs, &v.lastTrackID, data, w, h, c, thrsh, umns)
+	whole, recent := YoloDetectTrack2(y, v.lastTrackObjs, &v.lastTrackID, data, w, h, c, thrsh, umns)
 	y.tracker[id].lastTrackObjs = whole
 	y.tracker[id].lastTrackID = v.lastTrackID
 

--
Gitblit v1.8.0