Update app.py
Browse files
app.py
CHANGED
@@ -300,12 +300,12 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
300 |
# cv2.putText(image,f"Bend Forward",
|
301 |
# (320,200),cv2.FONT_HERSHEY_SIMPLEX,1,(150,120,255),1,cv2.LINE_AA)
|
302 |
|
303 |
-
# 2. Lean Backward Warning
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
|
310 |
# stage 2
|
311 |
|
@@ -373,7 +373,7 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
373 |
# (230,60),cv2.FONT_HERSHEY_SIMPLEX,1,(255,255,255),1,cv2.LINE_AA)
|
374 |
|
375 |
|
376 |
-
|
377 |
mp_drawing.DrawingSpec(color=(255, 175, 0), thickness=2, circle_radius=2),
|
378 |
mp_drawing.DrawingSpec(color=(0, 255, 200), thickness=2, circle_radius=2))
|
379 |
|
|
|
300 |
# cv2.putText(image,f"Bend Forward",
|
301 |
# (320,200),cv2.FONT_HERSHEY_SIMPLEX,1,(150,120,255),1,cv2.LINE_AA)
|
302 |
|
303 |
+
# # 2. Lean Backward Warning
|
304 |
+
# if angleHipL > 45:
|
305 |
+
# print(f"AngleHipL when Bend backward warning:{angleHipL}")
|
306 |
+
# cv2.rectangle(image, (310, 180), (450, 220), (0, 0, 0), -1)
|
307 |
+
# cv2.putText(image,f"Bend Backward",
|
308 |
+
# (320,200),cv2.FONT_HERSHEY_SIMPLEX,1,(80,120,255),1,cv2.LINE_AA)
|
309 |
|
310 |
# stage 2
|
311 |
|
|
|
373 |
# (230,60),cv2.FONT_HERSHEY_SIMPLEX,1,(255,255,255),1,cv2.LINE_AA)
|
374 |
|
375 |
|
376 |
+
mp_drawing.draw_landmarks(image, results.pose_landmarks, mp_pose.POSE_CONNECTIONS,
|
377 |
mp_drawing.DrawingSpec(color=(255, 175, 0), thickness=2, circle_radius=2),
|
378 |
mp_drawing.DrawingSpec(color=(0, 255, 200), thickness=2, circle_radius=2))
|
379 |
|