| | |
| | | if item.CameraId == cameraId { |
| | | // 需要根据比例把前台画的区域的坐标转化为相应摄像机拍摄的图像的大小 x坐标分别*image.width/页面区域宽 y坐标分别*image.height/页面区域高 |
| | | // 前台宽高固定 |
| | | if item.Type != "line" { |
| | | if item.Type == "rect" { |
| | | cameraPolygons = append(cameraPolygons, &item) |
| | | } |
| | | } |
| | |
| | | // cameraPolygons := GetPolygons(arg.CameraId) |
| | | // list := AreaMapList{} |
| | | for _, polygon := range cameraPolygons { |
| | | log.Println("++++++在这儿看一下区域啊",polygon) |
| | | areaMap := &AreaMap{cameraId: cameraId, areaId: polygon.Id, areaJson: polygon.Polygon, triggerLine: polygon.TriggerLine, directionLine: polygon.DirectionLine} |
| | | // 为每个摄像机区域填充数据 |
| | | areaMap.CountAreaObjs(arg) |