none
How have access to Point Data ( FaceFrameResult.FacePointsInInfrared/ColorSpace) and FaceRotationQuaternion RRS feed

  • Question

  • Hi,

    I'm trying to find the most information possible from the sdk 2, sample facebasic.

    Now I am in "Reader_FaceFrameArrived" function and I would like to recover the five point coordinate (the Left Eye, Right Eye, Nose and, right and left mouth corners).

    Is there a mode for print only certain points? es only X and Y of RightEye? if in the frame there are two people, how i can extract the feature of particular person (knowing the id).


    Another thing.

    I print the FaceRotationQuaternion, can i call a similar "ExtractFaceRotationInDegrees" function in Reader_FaceFrameArrived, for obtain and save the real value of pitch, yaw and roll?

    Thany you in advance for your reply!

    Thursday, October 16, 2014 10:27 AM

Answers

  • those faces are associated with the body, and you can track six people's face just like six skeleton.

    when you create a FaceFrameSource, you should specify which face you want to track by providing a track id. you can also change it lately.

    this track id should equal to the one you get from Body.

    Monday, October 20, 2014 10:44 AM

All replies

  • Can you provide more information on "print"? The Kinect SDK has no knowledge of UI frameworks. As the sample demonstrates, you can get the feature values and output the location. This will be either CameraSpacePoint (if color selected) or DepthSpacePoint(for IR). This is a struct with X and Y values.

    The sample provides the best practice for calling the API's. It already shows how to get the quaternion value, what exactly are you trying to do?


    Carmine Sirignano - MSFT

    Thursday, October 16, 2014 9:13 PM
  • Can you provide more information on "print"? The Kinect SDK has no knowledge of UI frameworks. As the sample demonstrates, you can get the feature values and output the location. This will be either CameraSpacePoint (if color selected) or DepthSpacePoint(for IR). This is a struct with X and Y values.

    The sample provides the best practice for calling the API's. It already shows how to get the quaternion value, what exactly are you trying to do?


    Carmine Sirignano - MSFT


    I can get the feature values and output the location. (right eye for example).
    But if in the scene there are two people, how can I know which person are the coordinates obtained?

    I would like to extract this information in order to map a video gaze of the people. (using heat-map locating where a particular person is watching).

    Do you have any suggestions?
    Monday, October 20, 2014 7:30 AM
  • those faces are associated with the body, and you can track six people's face just like six skeleton.

    when you create a FaceFrameSource, you should specify which face you want to track by providing a track id. you can also change it lately.

    this track id should equal to the one you get from Body.

    Monday, October 20, 2014 10:44 AM
  • I woluld like to save the value of pitch roll and yaw for each tracked person.

    if (this.faceFrameSources[i].TrackingId != 0) { sw.WriteLine("TrackID[" + i + "]= " + this.faceFrameSources[i].TrackingId.ToString() ); if (faceFrame.FaceFrameResult.FaceRotationQuaternion != null) { int pitch, yaw, roll;

    ExtractFaceRotationInDegrees(faceFrameResults[i].FaceRotationQuaternion, out pitch, out yaw, out roll); sw.WriteLine(Pitch); sw.WriteLine(Yaw); sw.WriteLine(Roll); } }

    I have write this, but i have a problem.

    Infact when i run the code. After some times i have this error:

    "NullReferenceException was unhandled"

    An unhandled exception of type 'System.NullReferenceException' occurred.

    The error is in the call function row: "ExtractFaceRotationInDegrees(faceFrameResults[i].FaceRotationQuaternion, out pitch, out yaw, out roll);"

    How can I fix it?


    • Edited by Skipper11 Thursday, October 23, 2014 10:22 AM
    Thursday, October 23, 2014 10:22 AM
  • Depending on the application and use of the frame data, this can get released on you. Is this the sample code you are running or a different application you are creating. Are you checking for null on this.faceFrameSources[i] and faceFrameResults[i] before using them?


    Carmine Sirignano - MSFT

    Thursday, October 23, 2014 8:55 PM