Also see Jurgeon D's answer to finding the Kinect SDK player as it deals with the skeleton index. @Fixus is also right as you can use an ID. But if you mean more than two people, then only one is detected, that is, not programming, that is, in the Kinect and @FelixK equipment. was right.
Skeleton index
void nui_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e) { SkeletonFrame sf = e.SkeletonFrame;
Skeletal identifiers
void nui_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e) { SkeletonFrame sf = e.SkeletonFrame; if (sf.TrackingState == SkeletalTrackingState.Tracked) { int ID1 = sf.TrackingID; }
Also a code for detecting people
DepthImageFrame depthFrame; short[] rawDepthData = new short[depthFrame.PixelDataLength]; depthFrame.CopyPixelDataTo(rawDepthData); Byte[] pixels = new byte[depthFrame.Height * depthFrame.Width * 4]; int player = rawDepthData[depthIndex] & DepthImageFrame.PlayerIndexBitmask; if (player > 0) {
source share