提交 628447c2 编写于 作者: V Vadim Pisarevsky

replaced non-available in MacOSX' numpy deg2rad in motempl.py

上级 8dacbeb1
......@@ -12,7 +12,7 @@ def draw_motion_comp(vis, (x, y, w, h), angle, color):
cv2.rectangle(vis, (x, y), (x+w, y+h), (0, 255, 0))
r = min(w/2, h/2)
cx, cy = x+w/2, y+h/2
angle = np.deg2rad(angle)
angle = angle*3.1415926/180
cv2.circle(vis, (cx, cy), r, color, 3)
cv2.line(vis, (cx, cy), (int(cx+np.cos(angle)*r), int(cy+np.sin(angle)*r)), color, 3)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册