none
Head Pose, Kinect SDK, WPF C# RRS feed

  • Question

  • Hello

    I am using Kinect SDK v1.7 Visual Studio(C#). I try to calculate Head POSE (head yaw, pitch and roll angles). I did it for the hip center joint and it works pretty good. As I read, there is a way to obtain head pose using face tracking function of kinect SDK. 

    Dose any one have a sample code on that?

    Thanks

    Friday, July 12, 2013 2:23 PM

Answers

  • Indeed FaceTracking API for Kinect includes Head rotation.

    Here is a quick sample

    FaceTrackFrame faceFrame = this._faceTracker.Track(
                                                    this._kinectSensor.ColorStream.Format, colorPixelData,
                                                    this._kinectSensor.DepthStream.Format, depthPixelData,
                                                    skeleton);
    
    if (faceFrame.TrackSuccessful)
    {
      // Head Pose Angles http://msdn.microsoft.com/en-us/library/jj130970#k4w_face_head_pose_angles
      // X - Pitch
      // Y - Yaw
      // Z - Roll
    
      Vector3DF faceRotation = faceFrame.Rotation;
    
      string pose = string.Format("Pitch:\t{0:+00;-00}°\nYaw:\t{1:+00;-00}°\nRoll:\t{2:+00;-00}°", faceRotation.X, faceRotation.Y, faceRotation.Z);
    }
    

    Do forget to include FaceTrackLib.dll and FaceTrackData.dll in the project with "Content/Copy if new" properties.


    Vincent Guigui Innovative Technologies Expert at OCTO Technology MVP Kinect

    Saturday, July 13, 2013 9:26 PM
  • Thank you for your response. Faceframe with faceTracker works well. 



    • Marked as answer by Parsa ENGZ Monday, July 15, 2013 10:55 AM
    • Edited by Parsa ENGZ Monday, July 15, 2013 11:19 AM just a typo
    Monday, July 15, 2013 10:55 AM

All replies

  • Indeed FaceTracking API for Kinect includes Head rotation.

    Here is a quick sample

    FaceTrackFrame faceFrame = this._faceTracker.Track(
                                                    this._kinectSensor.ColorStream.Format, colorPixelData,
                                                    this._kinectSensor.DepthStream.Format, depthPixelData,
                                                    skeleton);
    
    if (faceFrame.TrackSuccessful)
    {
      // Head Pose Angles http://msdn.microsoft.com/en-us/library/jj130970#k4w_face_head_pose_angles
      // X - Pitch
      // Y - Yaw
      // Z - Roll
    
      Vector3DF faceRotation = faceFrame.Rotation;
    
      string pose = string.Format("Pitch:\t{0:+00;-00}°\nYaw:\t{1:+00;-00}°\nRoll:\t{2:+00;-00}°", faceRotation.X, faceRotation.Y, faceRotation.Z);
    }
    

    Do forget to include FaceTrackLib.dll and FaceTrackData.dll in the project with "Content/Copy if new" properties.


    Vincent Guigui Innovative Technologies Expert at OCTO Technology MVP Kinect

    Saturday, July 13, 2013 9:26 PM
  • Thank you for your response. Faceframe with faceTracker works well. 



    • Marked as answer by Parsa ENGZ Monday, July 15, 2013 10:55 AM
    • Edited by Parsa ENGZ Monday, July 15, 2013 11:19 AM just a typo
    Monday, July 15, 2013 10:55 AM