From 87a0ba64b8a3be8a17c4b4dbd8d129d0c9ae1013 Mon Sep 17 00:00:00 2001 From: Hao Zheng Date: Fri, 18 Dec 2020 12:56:07 +0800 Subject: [PATCH] Fix minor bug --- joints_detectors/Alphapose/fn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joints_detectors/Alphapose/fn.py b/joints_detectors/Alphapose/fn.py index 31014e2..ed704d2 100644 --- a/joints_detectors/Alphapose/fn.py +++ b/joints_detectors/Alphapose/fn.py @@ -216,7 +216,7 @@ def vis_frame(frame, im_res, format='coco'): length = ((Y[0] - Y[1]) ** 2 + (X[0] - X[1]) ** 2) ** 0.5 angle = math.degrees(math.atan2(Y[0] - Y[1], X[0] - X[1])) stickwidth = (kp_scores[start_p] + kp_scores[end_p]) + 1 - polygon = cv2.ellipse2Poly((int(mX), int(mY)), (int(length / 2), stickwidth), int(angle), 0, 360, 1) + polygon = cv2.ellipse2Poly((int(mX), int(mY)), (int(length / 2), int(stickwidth)), int(angle), 0, 360, 1) cv2.fillConvexPoly(bg, polygon, line_color[i]) # cv2.line(bg, start_xy, end_xy, line_color[i], (2 * (kp_scores[start_p] + kp_scores[end_p])) + 1) transparency = max(0, min(1, 0.5 * (kp_scores[start_p] + kp_scores[end_p])))