| | |
| | | "ruleprocess/cache" |
| | | "basic.com/valib/logger.git" |
| | | "ruleprocess/ruleserver" |
| | | "ruleprocess/structure" |
| | | "strings" |
| | | ) |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | func DrawPolygonOnImageForYolo(cameraId string, img protomsg.Image, results []ruleserver.Result,url string) (maps map[string]interface{}, err0 error) { |
| | | 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) |
| | | //rook := gocv.IMRead("/home/user/workspace/ruleprocess/util/105.jpg",gocv.IMReadColor) |
| | |
| | | for _,result := range results { |
| | | polygonIds := strings.Split(result.AlarmPolygon,",") |
| | | logger.Info("-----------------------看看报警区域id:",polygonIds) |
| | | for i := 0; i < len(polygonIds)-1; i++ { |
| | | for i := 0; i < len(polygonIds); i++ { |
| | | polygon := getPolygonById(polygonIds[i],cameraId) |
| | | if polygon.Polygon != "[]" && polygon.Polygon != ""{ |
| | | logger.Debug("所画区域:",polygon.Polygon) |
| | |
| | | return |
| | | } |
| | | |
| | | func DrawPolygonOnImageForFace(cameraId string, img protomsg.Image, results []ruleserver.FaceResult,url string) (maps map[string]interface{}, err0 error) { |
| | | func DrawPolygonOnImageForFace(cameraId string, img protomsg.Image, results []structure.FaceResult,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) |
| | |
| | | for _,result := range results { |
| | | polygonIds := strings.Split(result.AlarmPolygon,",") |
| | | logger.Info("-----------------------看看报警区域id:",polygonIds) |
| | | for i := 0; i < len(polygonIds)-1; i++ { |
| | | for i := 0; i < len(polygonIds); i++ { |
| | | polygon := getPolygonById(polygonIds[i],cameraId) |
| | | if polygon.Polygon != "[]" && polygon.Polygon != ""{ |
| | | logger.Debug("所画区域:",polygon.Polygon) |