none
Error in Kinect Finger Tracking code RRS feed

  • Question

  • Initially i got this Exception,

    Then i fix this problem at line 311, using if and else:

     double firstLine = cursorTop + 3 + (outputPos * 7);
                for (int fingerIdx = 0; fingerIdx < 5; fingerIdx++)
                {
                    try
                    {
                        Array f = Enum.GetValues(typeof(Hand.FingerJointType));
                        Array fNames = Enum.GetNames(typeof(Hand.FingerJointType));
                        int idxInEnum = fingerIdx * 3;
                        Microsoft.Kinect.DepthSpacePoint[] p = new Microsoft.Kinect.DepthSpacePoint[3];
                        string[] jointNames = new string[3];
                        for (int j = 0; j < 3; j++)
                        {
                            Hand.FingerJointType jt = (Hand.FingerJointType)f.GetValue(idxInEnum + j);
                            if (hand.FingerJoints.ContainsKey(jt))
                            {
                                p[j] = hand.FingerJoints[jt];
                            }
                            else
                            {
                                MessageBox.Show("Not Found");
                            }
                            jointNames[j] = (string)fNames.GetValue(idxInEnum + j);

    Now my screen is pausing at first Kinect Frame arrival and Displaying the messageBox Not Found. My code requires this Key, Can anyone tell me how to add this key in my code..


    Student of Software Engineering.


    • Edited by Beaya Tuesday, May 26, 2015 2:06 PM
    Tuesday, May 26, 2015 2:03 PM

All replies