none
Where can I get 3D Points Reference for Facetracking? RRS feed

  • Question

  • I would like to know how to get the face 3D points in the Kinect. Could someone help me? In the documentation I found only 2D.
    Friday, June 22, 2012 4:33 PM

Answers

  • GetProjected3DShape will give you the 121 points mapped to 2D, but Get3DShape will give you the 121 actual 3D points.  For example, you can list the (X, Y, Z) coordinates with the following code:

    EnumIndexableCollection<FeaturePoint, Vector3DF> facePoints3D = frame.Get3DShape();
    
    int index = 0;
    
    foreach (Vector3DF vector in facePoints3D)
    {
        Debug.WriteLine(string.Format("{0}: ({1}, {2}, {3})", index++, vector.X, vector.Y, vector.Z));
    }

    Which outputs something like this:

    0: (-0.0315027, 0.1807005, 0.7154029)
    1: (-0.05626101, 0.1506539, 0.6737584)
    2: (-0.03687431, 0.1186492, 0.6583354)
    3: (-0.03797133, 0.08693701, 0.6548481)
    4: (-0.0380326, 0.07894778, 0.6573207)
    5: (-0.04054224, 0.02638854, 0.6407686)
    6: (-0.04003174, 0.02086526, 0.651091)
    7: (-0.04070279, 0.003234916, 0.6481996)
    8: (-0.04120811, -0.0127593, 0.6471879)
    9: (-0.04106653, -0.02048828, 0.6527092)
    10: (-0.04161226, -0.05163926, 0.6575699)
    ...
    120: (-0.1061045, 0.06935848, 0.8000339)

    Of course, your actual points will vary.  Hope this helps.


    • Edited by kengr Wednesday, September 26, 2012 5:42 PM
    • Proposed as answer by kengr Wednesday, September 26, 2012 5:43 PM
    • Marked as answer by Chris Wojahn, Security IR Monday, October 29, 2012 7:52 PM
    Wednesday, September 26, 2012 5:42 PM

All replies

  • GetProjected3DShape will give you the 121 points mapped to 2D, but Get3DShape will give you the 121 actual 3D points.  For example, you can list the (X, Y, Z) coordinates with the following code:

    EnumIndexableCollection<FeaturePoint, Vector3DF> facePoints3D = frame.Get3DShape();
    
    int index = 0;
    
    foreach (Vector3DF vector in facePoints3D)
    {
        Debug.WriteLine(string.Format("{0}: ({1}, {2}, {3})", index++, vector.X, vector.Y, vector.Z));
    }

    Which outputs something like this:

    0: (-0.0315027, 0.1807005, 0.7154029)
    1: (-0.05626101, 0.1506539, 0.6737584)
    2: (-0.03687431, 0.1186492, 0.6583354)
    3: (-0.03797133, 0.08693701, 0.6548481)
    4: (-0.0380326, 0.07894778, 0.6573207)
    5: (-0.04054224, 0.02638854, 0.6407686)
    6: (-0.04003174, 0.02086526, 0.651091)
    7: (-0.04070279, 0.003234916, 0.6481996)
    8: (-0.04120811, -0.0127593, 0.6471879)
    9: (-0.04106653, -0.02048828, 0.6527092)
    10: (-0.04161226, -0.05163926, 0.6575699)
    ...
    120: (-0.1061045, 0.06935848, 0.8000339)

    Of course, your actual points will vary.  Hope this helps.


    • Edited by kengr Wednesday, September 26, 2012 5:42 PM
    • Proposed as answer by kengr Wednesday, September 26, 2012 5:43 PM
    • Marked as answer by Chris Wojahn, Security IR Monday, October 29, 2012 7:52 PM
    Wednesday, September 26, 2012 5:42 PM
  • After getting these points how we find the distance between these points and tells me how we find points in 2D.

    Tuesday, July 15, 2014 8:41 AM
  • where i put the above code to get the 121 points on screen.
    i m running the FaceTrackingBasics-wpf sample project.
    Tuesday, July 15, 2014 10:37 AM