Thank you for your help, Walt. One last question, I have a difficulty using IsInGripInterac
tion property in your script. Some tutorial tells me I need to create KinectRegion to use IsInGripInterac tion. But I want this to be working on windows desktop enviroment, not just in an application with KinectRegion set. Would you please guide me to the way?
Hell Walt, Thanks for the great tutorial. I am wondering how we can add Mouse Left Button double Click event, hopely it triggers when right hand is closed. Native MS kinect support "Grip". Would you show me little more tutorial on "how to add more mouse event" to your current tutorial, please?
Hi quadratic, The code in MainWindow.xaml
.cs already contains a method called "CheckForClickH old" which is using a timer to click the left mouse button if the user hovers over a location for a set period of time. If I were you, I would probably write another, similar method called "CheckForGrip" and place the grip checking code in that method. Then I would comment out the CheckForClickHo ld method call in the SensorSkeletonF rameReady method and substitute a call for your new method, something like: var leftClick = CheckForGrip(sc aledRightHand); That will cause the SendMouseInput method in the next line of code to send the result of your grip check over to the mouse input handler in Windows, which should give you the effect you desire. Hope that helps you.
Hey Walt, this is the error I'm getting. "Provide value on 'System.Windows
.Baml2006.TypeC onverterMarkupE xtension' threw an exception." on the MainWindows.xam l file. I just want to know why? Thanks!
Tobias, Your issue is a common problem with Visual Studio. There are several things that might be causing the problem, none of which are related to the actual project. You might check out this link for some possible solutions. If you can't get it working, you might raise the issue on the Visual Studio forum where others apparently have had this same problem. http://connect.
microsoft.com/V isualStudio/fee dback/details/5 33882/provide-v alue-on-system- windows-baml200 6-typeconverter markupextension -threw-an-excep tion
I ran into this same exact problem and spent lots of time trying to fix it. The issue was the icon in the XAML. Simply delete this line and run it. Icon="CursorCon
trol.ico" P.S. Thanks for the code Walt!
So I see that the ScaleTo method in the sample code is based in an extension of the the Joint object - how can I bring this into my own custom application? Similiarly, with SystemParameter
s, I can see that it is in System.Windows, but in my own custom project, the only child of System.Windows is Forms, SystemParameter s is not to be seen. Lastly, when I download the sample code, I get a NullPointerExce ption in the xaml when I attempt to run it - why is this?
Hi Tobias, Thank you for the questions. Let me see if I can answer them for you. 1) The ScaleTo method is included in the Coding4Fun.Kine
ct.Wpf dll, which is in turn part of the Coding4Fun.Kine ct project, which you can find here - http://c4fkinec t.codeplex.com. 2) To get SystemParameter s, you should be able to reference System.Windows in your own code as I have done in my code with "using System.Windows; " in the source code. You might have to add the reference into your own project if it is not there by default. 3) Lastly, I am not sure where you are getting the null pointer exception, but you might be able to get rid of that by looking at the dependencies in the project, such as having the proper Kinect SDK (1.5), the Kinect Developer Toolkit, or the Coding4Fun packages. If you post some more detail about your error like maybe a call stack or something, I might be able to help you further.