panlei
2019-11-14 8c3063e420502667043e0e1bdb35eef05fbd133b
结果标签大改动
1个文件已修改
6 ■■■■ 已修改文件
util/simpleCV.go 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
util/simpleCV.go
@@ -178,8 +178,8 @@
    }
    // 把目标框出来
    for _,result := range results  {
        for _,rect := range result.Location {
            gocv.Rectangle(&rook, image.Rect(int(rect.X), int(rect.Y), int(rect.X+rect.Width), int(rect.Y+rect.Height)), red, 1)
        for _,rect := range result.AlarmObj {
            gocv.Rectangle(&rook, image.Rect(int(rect.Location.X), int(rect.Location.Y), int(rect.Location.X+rect.Location.Width), int(rect.Location.Y+rect.Location.Height)), red, 1)
        }
    }
    //return nil,nil
@@ -187,7 +187,7 @@
    return
}
func DrawPolygonOnImageForFace(cameraId string, img protomsg.Image, results []structure.TargetResult,url string) (maps map[string]interface{}, err0 error) {
func DrawPolygonOnImageForFace(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)
    //rook := gocv.IMRead("/home/user/workspace/ruleprocess/util/105.jpg",gocv.IMReadColor)