Mousing around with the Kinect with Kinect Mouse Controller code sample
- Posted: Oct 08, 2012 at 6:00 AM
- 5,667 Views
- 3 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Today's project and source provides another example of using the Kinect as a mouse...
This sample will show you how to build a simple controller for the Kinect that will let you control the mouse on your Windows desktop using a Kinect device. This sample assumes that you have a Kinect for Windows device installed on your desktop and that you have the Kinect for Windows SDK Version 1.5 or greater. This sample also uses the WPF Kinect framework samples from Microsoft and I have included the necessary parts in the solution as a separate project.
Description
This sample is very simple to understand if you already have a basic understanding of how the Kinect works. If you do not, you might want to look at my other sample on Beginning Kinect Programming. The main tasks we will be doing in this sample are:
1) Intercept the skeleton information from the Kinect and pick out the right hand.
2) Figure out the position of the right hand relative to the screen of the PC.
3) Pass that position to a Microsoft API for mouse control.
That's it really. As I said, it's a simple thing to do once you know how. We are also going to simulate a mouse click() function by setting a timer when the user is hovering over any spot on the screen for a certain length of time. We do that by creating a stopwatch and timing the hovers. So in the MainWindow constructor for the WPF XAML you will see a stopwatch being created, like this:
...
Project Information URL: http://code.msdn.microsoft.com/Easy-Kinect-Mouse-09233c52
Project Download URL: http://code.msdn.microsoft.com/Easy-Kinect-Mouse-09233c52
Project Source URL: http://code.msdn.microsoft.com/Easy-Kinect-Mouse-09233c52
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Hi there,
I downloaded the code and "Build Solution", it is fine. But when I try to run it ,it kept showing "Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception." on the MainWindows.xaml file.
I just want to know why?
Thanks!
I get the same error - running the latest version of the SDK and VS2010
Best bet would be to post your question directly in the Q&A section of the sample. Goto the sample, and mid way down the page there's a Q&A tab. Walt has been answering some questions there already...
http://code.msdn.microsoft.com/Easy-Kinect-Mouse-09233c52/view/Discussions#content
Remove this comment
Remove this thread
close