ehsanhon commited on
Commit
604aae9
·
verified ·
1 Parent(s): 3656f1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -185,13 +185,13 @@ def calculate_angles_landmarks(landmarks):
185
 
186
  # from PIL import Image
187
  # Function to calculate the angles for both left and right sides and overlay on image
188
- def calculate_and_display_angles(image1, return_angles=False):
189
 
190
 
191
  mp_pose = mp.solutions.pose
192
  pose = mp_pose.Pose(min_detection_confidence=0.5, min_tracking_confidence=0.5)
193
 
194
- image = image1#cv2.imread(image_path)
195
  image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
196
 
197
  # pil_image = Image.open(image).convert('RGB') # PIL image
 
185
 
186
  # from PIL import Image
187
  # Function to calculate the angles for both left and right sides and overlay on image
188
+ def calculate_and_display_angles(image_path, return_angles=False):
189
 
190
 
191
  mp_pose = mp.solutions.pose
192
  pose = mp_pose.Pose(min_detection_confidence=0.5, min_tracking_confidence=0.5)
193
 
194
+ image = cv2.imread(image_path)
195
  image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
196
 
197
  # pil_image = Image.open(image).convert('RGB') # PIL image