3D视线转2D视线转换
gaze_theta = np.arcsin((-1) * gaze_norm[1]) ##pitch
gaze_phi = np.arctan2((-1) * gaze_norm[0], (-1) * gaze_norm[2]) ##yaw
gaze_norm_2d = np.asarray([gaze_theta, gaze_phi])
Headpose Vector转2D角度
当 可由下式进行简便计算
M = cv2.Rodrigues(head)[0]
Zv = M[:, 2]
head_2d = np.array([math.asin(Zv[1]), math.atan2(Zv[0], Zv[2])])