none
Kinect HDFace RRS feed

  • Question

  • Hi, I already know how to use a WPFApp to get all the vertices of HDFace. However, when I use ConsoleApp to export the coordinate of the nose, I meet some problems. Because in the ConsoleApp, all the eventhandlers, like BodyFrameReader_FrameArrived are static. So, it cannot access the instance fields, like faceMode. So, does anybody know how to export the coordinate of the nosetip in one ConsoleApp.

    Here is part of my code.

     private static void BodyFrameReader_FrameArrived(object sender, BodyFrameArrivedEventArgs e)
            {
                //throw new NotImplementedException();
                using (var frame = e.FrameReference.AcquireFrame())
                {
                    if (frame != null)
                    {
                        Body[] bodies = new Body[frame.BodyCount];
                        frame.GetAndRefreshBodyData(bodies);

                        Body body = bodies.Where(b => b.IsTracked).FirstOrDefault();

                        

                        if (!HDFaceFrameSource.IsTrackingIdValid)   //it cannot find the HDFaceFrameSource in this static method
                        {
                            if (body != null)
                            {
                                HDFaceFrameSource.TrackingId = body.TrackingId;
                            }
                        }
                    }
                }
            }



    • Edited by nvejhioej Saturday, March 2, 2019 8:44 AM
    Saturday, March 2, 2019 8:40 AM