added exercises plank and sit up

This commit is contained in:
Jon
2026-05-13 16:51:28 +01:00
parent 3e1889b9a7
commit 3a57de19b2

View File

@@ -20,7 +20,7 @@ count = 0
stage = None
mode = 'p' # default: push-ups
HINT = '[P]ush [U]pull [B]ench [C]url [R]eset [Q]uit'
HINT = '[P]ush [U]pull [B]ench [C]url [S]itup [L]plank [R]eset [Q]uit'
with mp_pose.Pose(min_detection_confidence=0.6, min_tracking_confidence=0.6) as pose:
while cap.isOpened():
@@ -54,7 +54,7 @@ with mp_pose.Pose(min_detection_confidence=0.6, min_tracking_confidence=0.6) as
cv2.rectangle(image, (0, 0), (w, 80), (15, 15, 15), -1)
cv2.putText(image, ex['name'], (12, 30),
cv2.FONT_HERSHEY_SIMPLEX, 0.85, color, 2)
cv2.putText(image, f'REPS: {count}', (12, 68),
cv2.putText(image, f'{ex["unit"]}: {count}', (12, 68),
cv2.FONT_HERSHEY_SIMPLEX, 1.3, (0, 255, 0), 3)
cv2.putText(image, (stage or '---').upper(), (w - 108, 50),
cv2.FONT_HERSHEY_SIMPLEX, 0.9, (180, 180, 0), 2)