samedi 25 avril 2015

SDK V1.8 kinect gesture control


I am working on a project that if left hand is on the right side of the head and the right hand is higher than spine the the F3 key will go on etc.... What am i doing wrong, the code dosent read the ProcessControlGesture. I am new to this please help! How do i define IsMoveRightGestureActive

private void ProcessControlGesture(Joint head, Joint rightHand, Joint leftHand, Joint spine) { if (leftHand.Position.X > head.Position.X && rightHand.Position.Y > spine.Position.Y) { if (!isMoveRightGestureActive) { isMoveRightGestureActive = true; Console.WriteLine(" Move Left Gesture Regniized: MOVE LEFT"); System.Windows.Forms.SendKeys.SendWait("{F3}"); } } else { isMoveRightGestureActive = fasle; }

        if (rightHand.Position.X < head.Position.X && leftHand.Position.Y > spine.Position.Y)
        {
            if (!isMoveLeftGestureActive)
            {
                isMoveLeftGestureActive = true;
                Console.WriteLine(" Move Right Gesture Recognized: MOVE RIGHT");
                System.Windows.Forms.SendKeys.SendWait("{F1}");
            }
        }
        else
        {
            isMoveLeftGestureActive = false;
        }

        if (leftHand.Position.Y > head.Position.Y && rightHand.Position.Y > head.Position.Y)
        {
            if (!isStopGestureActive)
            {
                isStopGestureActive = true;
                Console.WriteLine("STOP");
                System.Windows.Forms.SendKeys.SendWait("{F5}");


Aucun commentaire:

Enregistrer un commentaire