amanda 3 سال پیش
والد
کامیت
408fda21bf
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      backend_refactor/service/ai/video/video_score/jump.py

+ 2 - 1
backend_refactor/service/ai/video/video_score/jump.py

@@ -47,12 +47,13 @@ def cal_jump(result):
     min_wrist_height = float(result[list(result.keys())[0]]["wrist_heigh"])
     min_hip_angle = float(result[list(result.keys())[0]]["hip_right_angle"])
     min_wrist_index = list(result.keys())[0]
+    min_hip_angle_index = list(result.keys())[0]
     for index in result:
         if float(result[index]["leg_heigh"]) >= initial_ankle_height - 3:
             if float(result[index]["hip_right_angle"]) <= min_hip_angle and float(
                     result[index]["hip_right_angle"]) != 0.0:
                 min_hip_angle = float(result[index]["hip_right_angle"])
-                global min_hip_angle_index = index
+                min_hip_angle_index = index
         if float(index) > float(highest_ankle_index):
             break
         # else: