08-08-2011 12:41 AM
Hey guys,
I recently got an XBox Kinect and downloaded the Microsoft SDK for Win7 with the intention of using it with LabVIEW. After a little experimentation I got stuck until I saw the presentation at NI Week by the folks from LabVIEWHacker.com. Thanks to that sharp group I got a whole lot further. I am very impressed with this cheap, little gadget!
I've attached two examples that use the Skeleton Engine of the Kinect. They were tricky. They are simple examples but, hopefully, they show how to create more sophisticated tasks.
Good luck!
08-08-2011 09:23 PM
I've added a slightly modified version of the Kinect Expt project. Hold your hand slightly above your head, move it around and watch the dot on the smaller Picture Control follow your hand movements. Enjoy...
02-14-2012 05:08 AM
Hi 2and4,I have seen your vi about kinect. And I use this vi in labview with a kinect. It works really good and here i have a question want to ask in the vi named "Kinect Expt", how I can get the position(XY) of my right fist. But now I don't know how to get my left hand's position or some other skeleton's positions in this VI. Can you help me?
02-14-2012 07:59 PM
davylee,
I haven't looked at this example in a while, and I haven't tried what you're asking. But try the following:
1. Look inside SkelFrmRdy_EvntHdlr.vi.
2. Notice that the property node for "SkeletonFrame" outputs an array of Skeleton References ("Skeletons"), so it should already contain as many references as Skeletons. If you have two people in the frame the array of Skeleton References should be two elements long.
3. Notice that I index through all the Skeleton References.
4. For each Skeleton Reference I read a property called "Joints".
5. For each "Joints" (same as "JointsCollection") reference I'm invoking a method called "get_Item".
6. You'll notice the "get_Item" method takes an argument "i" which is a Ring constant currently set to "HandRight".
7. Try changing "HandRight" to "HandLeft" and see what that does.
Hope that helps. I'm on the road and currently don't have access to a Kinect to try this out.
02-23-2012 12:27 AM
Thanks to your advice, these days I successfully use this vi to get some other skeleton joints and the position of them. It really helps me a lot.
Thank you , wish you all the best.
02-23-2012 08:04 AM
04-02-2012 04:34 PM
If I would like to get the Z value for the position of the joint, how would I do that?
04-02-2012 04:49 PM
Also, how would I be able to view that in your main Kinect Expt vi?
04-03-2012 10:53 PM
Hello Brandon,
By Z value, are you referring to the distance from the camera? I don't have the correct SDK installed to run this example, but you may be able to expand the "vectors" property node in SkelFrmRdy_EvntHdlr.vi to provide a third axis. You may also be able to use the Kinect's buit-in depth detect function, but this is fairly limited, and accurate/long distance measurements would probably require the use of a reference grid or pattern on the joint that you could extrapolate distance from. Otherwise, some sort of binocular vision setup or a separate ranging sensor would be required -this post might be of use to you if you decide to go that route.
04-03-2012 11:02 PM
Yes, I can expand the vector to include a Z variable, but when I try to bundle that together and send it to "value" in the past property node, it doesnt allow me because the refnum is strict, and I do not know how to change it to allow me to have an input of a cluster containing 3 points of data.
Another question, which is somewhat related: how would I go about obtaining joint data from different joints simultaneously?