Lesson 2 – Using Gestures with the Kinect SDK

Back in November, some of you may have found out how to make a simple application which makes sounds and that can hover over buttons (Lesson 1). I got thinking that some of you may not want to hover over buttons and may want to make more use of gestures in your applications.

In this lesson I have shown you how you can add in some simple processes to your application which detect which position your hand is at. For example, if your hand is above your head, a nice message box will pop up. Now what you’re about programmingto read below may sound a little technical but I will say that you should be able to follow it all from the video tutorial included. The only thing you will need for this lesson is:

It is all about saying where the Joint is at that moment in time. For example:

I included this piece of code straight underneath the piece of the program which sets the position of my red circles:

ProcessGesture(data.Joints[JointID.Head], data.Joints[JointID.HandLeft], data.Joints[JointID.HandRight]);

This small piece of code passes each of the joints to a new process which is called gesture. The process uses these joints to find out where they are at that point in time. It is like standard English. if the position of the right hand is greater than the position of the head, then send out the message.

private void ProcessGesture(Joint head, Joint handleft, Joint handright)
           if (handright.Position.Y > head.Position.Y)
               MessageBox.Show(“Your Hand Is Above Your Head”);


OK, so I realise that this might sound really technical, however just give it a go. You can see in the video that it took roughly 10 minutes to make. Why not give 10 minutes of your time and try and get your program to do things based on your gesture.

Kinect SDK–Gestures

About Raymond David James Chambers

I am the Lead teacher of computing at Brooke Weston Academy in Corby Northamptonshire. Previously I was the head of IT/Computing at Uppingham Community College. In 2015 I won the Gold National Teaching award for Innovative use of technology. I also won the 2015 Young Game Bafta - Mentor award. I'm keen to help students achieve their best and like to give them opportunities to do this. I have a passion for teaching and I enjoy meeting other people and sharing their ideas. I have a keen interest in games development as well as developing the use of ICT in classrooms across the curriculum. In my spare time I teach Irish dancing. I have been Irish dancing since I was 11. My highest position was 14th at the world championships 3 years running and 2nd at the Great Britain Championships in 2006.
This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to Lesson 2 – Using Gestures with the Kinect SDK

  1. Yovi says:

    Very clear and helpful. Thank you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s