Update app.py
Browse files
app.py
CHANGED
|
@@ -195,11 +195,11 @@ def calculate_angles_landmarks(landmarks):
|
|
| 195 |
return angles,locations
|
| 196 |
|
| 197 |
# Function to calculate the angles for both left and right sides and overlay on image
|
| 198 |
-
def calculate_and_display_angles(
|
| 199 |
mp_pose = mp.solutions.pose
|
| 200 |
pose = mp_pose.Pose(min_detection_confidence=0.5, min_tracking_confidence=0.5)
|
| 201 |
|
| 202 |
-
image = cv2.imread(image_path)
|
| 203 |
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
| 204 |
|
| 205 |
# Get pose landmarks
|
|
|
|
| 195 |
return angles,locations
|
| 196 |
|
| 197 |
# Function to calculate the angles for both left and right sides and overlay on image
|
| 198 |
+
def calculate_and_display_angles(image1, return_angles=False):
|
| 199 |
mp_pose = mp.solutions.pose
|
| 200 |
pose = mp_pose.Pose(min_detection_confidence=0.5, min_tracking_confidence=0.5)
|
| 201 |
|
| 202 |
+
image = image1#cv2.imread(image_path)
|
| 203 |
image_rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
| 204 |
|
| 205 |
# Get pose landmarks
|