import math | |
from .numpy_utils import rotate_point_euler | |
# mediapipe utils work with other glibvisions | |
def rotate_points(points,angles,order="xyz",is_degree=False): | |
if is_degree: | |
angles = [math.radians(float(value)) for value in angles] | |
rotated_cordinates = [] | |
for point in points: | |
rotated_np_point = rotate_point_euler(point,angles,order) | |
rotated_cordinates.append( | |
[ | |
rotated_np_point[0], | |
rotated_np_point[1],rotated_np_point[2] | |
] | |
) | |
return rotated_cordinates | |