none
sign language using kinect RRS feed

  • Question

  • hi guys, I'm developing a sign language translation app using a kinect and visual studio

    I managed to get the coordinates of the fingers using a library. But now I need to have a reference point in each hand for ex: 

    Reference = ThumbBase-PinkyBase, in order to calculate the distance between the reference and each finger and compare the sign. I'm having trouble in this part and I hope someone can help : 

    The output of my current project is something like this: 

    ThumbBase: 177 ; 209 ThumbMiddle: 183 ; 196  ThumbTip: 188 ; 187    // X and Y coordinates in frame

    IndexBase:  .....   IndexMiddle: .....  IndexTip: .....

    My code : 

    private static void PrintHand(KinectHand hand, int handNumber, int outputPos)
            {
                int firstLine = cursorTop + 3 + (outputPos * 7);
                Console.SetCursorPosition(cursorLeft, firstLine);
                Console.Write("Hand: " + handNumber);
                for (int fingerIdx = 0; fingerIdx < 5; fingerIdx++)
                {
                    try
                    {
                        Color c = Color.FromArgb(180, Engine.FingerColors[fingerIdx]);
                        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);
                            p[j] = hand.FingerJoints[jt];
                            jointNames[j] = (string)fNames.GetValue(idxInEnum + j);
                            Console.SetCursorPosition(cursorLeft + j * 25, firstLine + fingerIdx+1);
                            Console.Write(jointNames[j] + ": " + p[j].X.ToString("0.0") + ";" + p[j].Y.ToString("0.0") + "\n");       
                        }
    Monday, December 26, 2016 6:51 PM