Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
refactor: cleaner put_text indentation
Browse files Browse the repository at this point in the history
Co-authored-by: Mitchell Clark <[email protected]>
  • Loading branch information
LimaoC and MitchellJC committed Aug 24, 2024
1 parent a426215 commit 49fa3f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions client/models/pose_detection/landmarking.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ def put_text(text, pos, colour):
"""Wrapper function for cv2.putText that applies the default config"""
cv2.putText(annotated_image.data, text, pos, font, scale, colour, thickness)

if camera_aligned:
put_text("Camera aligned", alignment_text_pos, green)

if posture:
put_text("Good posture", posture_text_pos, green)
else:
put_text("Bad posture", posture_text_pos, red)
else:
if not camera_aligned:
put_text("Camera not aligned", alignment_text_pos, red)
return

put_text("Camera aligned", alignment_text_pos, green)
if posture:
put_text("Good posture", posture_text_pos, green)
else:
put_text("Bad posture", posture_text_pos, red)

0 comments on commit 49fa3f2

Please sign in to comment.