This commit is contained in:
iperov 2019-04-28 16:29:32 +04:00
parent 7c50003ec7
commit ab714dfbfe

View file

@ -348,7 +348,7 @@ def estimate_pitch_yaw_roll(aligned_256px_landmarks):
np.zeros((4, 1)) ) np.zeros((4, 1)) )
pitch, yaw, roll = mathlib.rotationMatrixToEulerAngles( cv2.Rodrigues(rotation_vector)[0] ) pitch, yaw, roll = mathlib.rotationMatrixToEulerAngles( cv2.Rodrigues(rotation_vector)[0] )
pitch = np.clip ( pitch*1.25, -1.0, 1.0 ) pitch = np.clip ( pitch/1.30, -1.0, 1.0 )
yaw = np.clip ( yaw*1.25, -1.0, 1.0 ) yaw = np.clip ( yaw / 1.11, -1.0, 1.0 )
roll = np.clip ( roll*1.25, -1.0, 1.0 ) roll = np.clip ( roll/3.15, -1.0, 1.0 )
return -pitch, yaw, roll return -pitch, yaw, roll