Skip to content

Commit

Permalink
Fix minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-plus committed Dec 18, 2020
1 parent 0f22801 commit 87a0ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion joints_detectors/Alphapose/fn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])))
Expand Down

0 comments on commit 87a0ba6

Please sign in to comment.