LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Kinect Skeleton Engine

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!

Download All
Message 1 of 19
(5,937 Views)

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...

0 Kudos
Message 2 of 19
(5,901 Views)

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?

1.jpg

0 Kudos
Message 3 of 19
(5,528 Views)

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.

Message 4 of 19
(5,517 Views)

2and4

    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.

0 Kudos
Message 5 of 19
(5,472 Views)
You're welcome!
0 Kudos
Message 6 of 19
(5,458 Views)

If I would like to get the Z value for the position of the joint, how would I do that?

0 Kudos
Message 7 of 19
(5,231 Views)

Also, how would I be able to view that in your main Kinect Expt vi?

0 Kudos
Message 8 of 19
(5,227 Views)

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.

Tom L.
0 Kudos
Message 9 of 19
(5,186 Views)

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?

0 Kudos
Message 10 of 19
(5,183 Views)