Yaw from faceframe rotation quaternion has a wrong angle? (no!) RRS feed

  • Question

  • I used the ExtractFaceRotationInDegrees method from Kinect sdk FaceBasics Sample and the Yaw's output looks wrong:
    if i face the kinect sensor the yaw angle is 0 but lookin on left to my shoulder the output is 45° and not 90°. 
    That's because the arcsin's "y" output is -1 ≤ ≤ 1 (is the inverse of sin function y = sin(x)) so is not possible to convert it in degrees with: 
    var yawD = Math.Asin(2*((w*y) - (x*z)))/Math.PI*180.0;
    the right proportion is:
    y : 1 = d : 90° => d = (90*y) so:
    var yawD = Math.Asin(2*((w*y) - (x*z)))*90.0;
    I hope this could save you some time :)
    Thursday, February 12, 2015 3:16 AM