From 8acceae3cdf014a42d4aacc123560263880865b3 Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期五, 15 十一月 2019 11:36:35 +0800
Subject: [PATCH] 给目标静止的第一帧画框给result
---
ruleserver/readyDataForRule.go | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ruleserver/readyDataForRule.go b/ruleserver/readyDataForRule.go
index 5f603fb..dbf5208 100644
--- a/ruleserver/readyDataForRule.go
+++ b/ruleserver/readyDataForRule.go
@@ -8,6 +8,7 @@
"errors"
"fmt"
"github.com/golang/protobuf/proto"
+ uuid "github.com/satori/go.uuid"
"math"
"nanomsg.org/go-mangos"
"nanomsg.org/go-mangos/protocol/req"
@@ -261,7 +262,7 @@
a.TargetNum = 0
threshold := 80.0 // 鐩镐技搴�
- intersectionper := 0.2 // 鍗犳瘮
+ intersectionper := 20.0 // 鍗犳瘮
size := 0.0 // 灏哄
areaPoints := Json2points(a.AreaJson)
@@ -273,7 +274,8 @@
if obj.Score >= threshold && float64(obj.Rects.Width*obj.Rects.Height) >= size && PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale) >= intersectionper {
// 杩欐瑕佸榻愯〃杈惧紡閲屾墍闇�瑕佺殑鎵�鏈夊弬鏁�
a.TargetNum++
- arg1 := structure.Arg{obj.Id,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*structure.BaseInfo{},nil}
+ uuid := uuid.NewV4().String()
+ arg1 := structure.Arg{obj.Id,uuid,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), a.AreaJson,obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*structure.BaseInfo{},structure.ResultMsg{}}
//logger.Println("鏀捐繘鍘荤殑arg锛�-------", arg1)
a.Args = append(a.Args, &arg1)
a.FilterData = append(a.FilterData, &arg1)
@@ -281,8 +283,6 @@
}
logger.Info("鍖哄煙鏄細",areaPoints,"鍖哄煙鍐呯洰鏍囨暟閲忎负锛�",a.TargetNum,"---",len(a.FilterData))
a.Time = time.Unix(time.Now().Unix(), 0).String()[11:16]
- a.KeepRight = arg.KeepRight
- a.IsStatic = arg.IsStatic
//logger.Println("--------------------鐪嬬湅鍖哄煙鏁版嵁锛�",*a)
}
--
Gitblit v1.8.0