Exemplo n.º 1
0
            torso_point = np.array([torso.point[0], torso.point[1], torso.point[2]])
            #waist_point = np.array([waist.point[0], waist.point[1], waist.point[2]])

            # print_if_accurate(limb_angle(left_hip_point, left_knee_point, left_foot_point), left_hip.confidence, left_knee.confidence, left_foot.confidence, name="Left knee")
            # print_if_accurate(limb_angle(right_hip_point, right_knee_point, right_foot_point), right_hip.confidence, right_knee.confidence, right_foot.confidence, name="Right knee")
            # print_if_accurate(limb_angle(torso_point, right_hip_point, right_knee_point), torso.confidence, right_hip.confidence, right_knee.confidence, name="Right hip")
            # print_if_accurate(limb_angle(torso_point, left_hip_point, left_knee_point), torso.confidence, left_hip.confidence, left_knee.confidence, name="Left hip")


            standing_accuracy = []   # TODO: FRANK : CONSIDERED WAIST NODE FOR BETTER ACCURACY THAN TORSO? -WAIST JOINT DOESNT WORK?
            
            if is_accurate(left_hip.confidence, left_knee.confidence, left_foot.confidence):
                standing_accuracy.append({
                    'weight': 25,
                    'angle': limb_angle(left_hip_point, left_knee_point, left_foot_point),
                    'proper_angle': 180,
                    'threshold': 25
                })
                #print "L Knee Standing angle ",limb_angle(left_hip_point, left_knee_point, left_foot_point) 
            if is_accurate(right_hip.confidence, right_knee.confidence, right_foot.confidence):
                standing_accuracy.append({
                    'weight': 25,
                    'angle': limb_angle(right_hip_point, right_knee_point, right_foot_point),
                    'proper_angle': 180,
                    'threshold': 25
                })
                #print "R Knee Standing angle ",limb_angle(right_hip_point, right_knee_point, right_foot_point) 
            if is_accurate(torso.confidence, right_hip.confidence, right_knee.confidence):
                standing_accuracy.append({
                    'weight': 25,
Exemplo n.º 2
0
            right_foot_point = np.array([right_foot.point[0], right_foot.point[1], right_foot.point[2]])

            torso_point = np.array([torso.point[0], torso.point[1], torso.point[2]])

            # print_if_accurate(limb_angle(left_hip_point, left_knee_point, left_foot_point), left_hip.confidence, left_knee.confidence, left_foot.confidence, name="Left knee")
            # print_if_accurate(limb_angle(right_hip_point, right_knee_point, right_foot_point), right_hip.confidence, right_knee.confidence, right_foot.confidence, name="Right knee")
            # print_if_accurate(limb_angle(torso_point, right_hip_point, right_knee_point), torso.confidence, right_hip.confidence, right_knee.confidence, name="Right hip")
            # print_if_accurate(limb_angle(torso_point, left_hip_point, left_knee_point), torso.confidence, left_hip.confidence, left_knee.confidence, name="Left hip")


            standing_accuracy = []
            
            if is_accurate(left_hip.confidence, left_knee.confidence, left_foot.confidence):
                standing_accuracy.append({
                    'weight': 25,
                    'angle': limb_angle(left_hip_point, left_knee_point, left_foot_point),
                    'proper_angle': 180,
                    'threshold': 20
                })
                #print "L Knee Standing angle ",limb_angle(left_hip_point, left_knee_point, left_foot_point) 
            if is_accurate(right_hip.confidence, right_knee.confidence, right_foot.confidence):
                standing_accuracy.append({
                    'weight': 25,
                    'angle': limb_angle(right_hip_point, right_knee_point, right_foot_point),
                    'proper_angle': 180,
                    'threshold': 20
                })
                #print "R Knee Standing angle ",limb_angle(right_hip_point, right_knee_point, right_foot_point) 
            if is_accurate(torso.confidence, right_hip.confidence, right_knee.confidence):
                standing_accuracy.append({
                    'weight': 25,