none
How to reading data from CSV file and conversion to skeleton RRS feed

  • Question

  • Hello,

    I am using Kinect sensor to do some health related application. As this application will be mainly providing the feed back to client about his health. I would read the data from csv file and I would like to have a skeleton view or the simple avathor.


    Reading the data from the  CSV file (instead of activating the Kinect sensor) and give this data as an input for conversion to a skeleton.

    So I need some help in doing this.  

    It would be much appreciated. 

    Monday, May 19, 2014 11:14 PM

All replies

  • Tuesday, May 20, 2014 5:49 PM
  • Hi I have tried follow your suggestions but still I am not able get success. Please help me.

    Here is my code what I tried. 

     private void SensorSkeletonFrameReady(ref Skeleton skeleton, DrawingContext drawingContext)
            {
            
                Array jointTypes = Enum.GetValues(typeof(JointType));
                SkeletonPoint position;
                Joint joint;
                Skeleton[] skeletons = new Skeleton[0];
                fs = new FileStream
                (@"C:\Users\Avathar\joints.csv", FileMode.Open, FileAccess.Read, FileShare.None);
                StreamReader sr = new StreamReader(fs);
                float[] x = new float[20];
                float[] y = new float[20];
                
         
                    foreach (JointType type in jointTypes)
                    {
                      
                       joint = skeletons. [Here iam getting an error]

                        // set state
                        joint.TrackingState = JointTrackingState.Tracked;

                        position = skeletons.Position;
                        position.X = 1.0f;
                        position.Y = 1.0f;
                        position.Z = 1.0f;

                        // set position
                        joint.Position = position;

                        // put joint back into skeleton
                      // skeletons.;
                       // this.DrawBonesAndJoints(type, dc);
                    }
                    // prevent drawing outside of our render area
                    this.drawingGroup.ClipGeometry = new RectangleGeometry(new Rect(0.0, 0.0, RenderWidth, RenderHeight));
                //}
            }

     
    • Edited by raja_king Sunday, June 1, 2014 9:59 PM
    Sunday, June 1, 2014 9:58 PM
  • based on your code, you have define joint as a Joint object, yet you are trying to assign it the skeletons array(Skeleton[] skeletons)? A skeleton object is a collection of Joints, you need to iterate the collection and fill in the values appropriately.

    Carmine Sirignano - MSFT

    Tuesday, June 3, 2014 11:10 PM