From 365f18d49473cb50a66c9af92de1d6794521cac8 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 07 十一月 2019 20:07:25 +0800
Subject: [PATCH] XMerge branch 'module' of http://192.168.5.5:10010/r/ruleprocess into module
---
util/simpleCV.go | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/util/simpleCV.go b/util/simpleCV.go
index b2c2cd7..d32691f 100644
--- a/util/simpleCV.go
+++ b/util/simpleCV.go
@@ -156,6 +156,10 @@
}
}
+<<<<<<< HEAD
+
+=======
+>>>>>>> a87978244bbb81f2fa7610560ed190acbaa422f8
func DrawPolygonOnImageForYolo(cameraId string, img protomsg.Image, results []structure.Result,url string) (maps map[string]interface{}, err0 error) {
rook, _ := gocv.NewMatFromBytes(int(img.Height), int(img.Width), gocv.MatTypeCV8UC3, img.Data)
@@ -172,7 +176,12 @@
for i := 0; i < len(polygonIds); i++ {
polygon := getPolygonById(polygonIds[i],cameraId)
if polygon.Polygon != "[]" && polygon.Polygon != ""{
+<<<<<<< HEAD
DrawAPolygon(&rook,polygon.Polygon,yellow,scale)
+=======
+ logger.Debug("鎵�鐢诲尯鍩燂細",polygon.Polygon)
+ DrawAPolygon(&rook,polygon.Polygon,yellow)
+>>>>>>> a87978244bbb81f2fa7610560ed190acbaa422f8
}
}
}
@@ -194,6 +203,7 @@
defer rook.Close()
yellow := color.RGBA{255, 255, 0, 0}
+<<<<<<< HEAD
scale := float64(img.Width) / 960 // 鐢诲浘姣斾緥
// 鍒嗗壊鍖哄煙id闆嗗悎骞舵牴鎹甶d鏌ヨ鍖哄煙鐒跺悗鐢绘
for _,result := range results {
@@ -202,6 +212,18 @@
polygon := getPolygonById(polygonIds[i],cameraId)
if polygon.Polygon != "[]" && polygon.Polygon != ""{
DrawAPolygon(&rook,polygon.Polygon,yellow,scale)
+=======
+
+ // 鍒嗗壊鍖哄煙id闆嗗悎骞舵牴鎹甶d鏌ヨ鍖哄煙鐒跺悗鐢绘
+ for _,result := range results {
+ polygonIds := strings.Split(result.AlarmPolygon,",")
+ logger.Info("-----------------------鐪嬬湅鎶ヨ鍖哄煙id锛�",polygonIds)
+ for i := 0; i < len(polygonIds)-1; i++ {
+ polygon := getPolygonById(polygonIds[i],cameraId)
+ if polygon.Polygon != "[]" && polygon.Polygon != ""{
+ logger.Debug("鎵�鐢诲尯鍩燂細",polygon.Polygon)
+ DrawAPolygon(&rook,polygon.Polygon,yellow)
+>>>>>>> a87978244bbb81f2fa7610560ed190acbaa422f8
}
}
}
--
Gitblit v1.8.0