| | |
| | | continue |
| | | } |
| | | for _, info := range faceParam.Faces { |
| | | photoMap := ruleserver.PhotoMap{Rects:ruleserver.Rect{}, Score: float64(info.Pos.Quality)} |
| | | photoMap := ruleserver.PhotoMap{Rects:ruleserver.Rect{-1,-1,-1,-1}, Score: float64(info.Pos.Quality)} |
| | | arg.Photo = append(arg.Photo, photoMap) |
| | | } |
| | | } |
| | |
| | | // 将外部传进来的rect(top,bottom,left,right)转化为自己内部的rect(left top width height) |
| | | func rectFormat(rcobj *protomsg.Rect) ruleserver.Rect { |
| | | rect := ruleserver.Rect{} |
| | | fmt.Println("看一下传入的矩形数据:",rcobj.Left,rcobj.Top,rcobj.Right,rcobj.Bottom) |
| | | rect.X = float64(rcobj.Left) |
| | | rect.Y = float64(rcobj.Top) |
| | | rect.Width = float64(rcobj.Right - rcobj.Left) |