nicetoolbox.detectors.feature_detectors.leaning.utils.calculate_angle_btw_three_points

nicetoolbox.detectors.feature_detectors.leaning.utils.calculate_angle_btw_three_points(data)[source]

Calculate the angle between three points in a 3D space.

Parameters:

data (numpy.ndarray) – A 4D numpy array with shape (num_subjects, num_frames, num_points, num_coordinates) representing the coordinates of points A, B, and C for each subject and frame.

Returns:

A 4D numpy array with shape (num_subjects, num_frames,

num_points, 1) containing the angle between the three points for each subject and frame.

Return type:

numpy.ndarray