Kinect的用户检测 [英] Kinect user Detection

查看:172
本文介绍了Kinect的用户检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当一个Kinect感应器检测到的骨架,因此人可以在其上工作,如果其他人来到附近检测到第二个人现有的用户我开发的应用程序。结果
我想限制Kinect传感器第一次检测,如果其他用户来这不应该检测到另一个用户。结果
在此先感谢

I am developing an application When an kinect sensor detects an skeleton that person can work on it if other person comes near to the existing user it detects the second person.
I want to restrict to the user the kinect sensor first detects it if other user comes this should not detect the other one.
thanks in advance

推荐答案

另见Jurgeon D对<一个答案href=\"http://stackoverflow.com/questions/10562554/kinect-sdk-player-detection/10562574#10562574\">Kinect SDK播放器检测的,因为它与骨架指数交易。 @Fixus也是正确的,你可以使用一个ID。但是,如果你的意思是超过2人被检测到,那么只有一个被检测到,这不是编程,那就是在Kinect的硬件和@FelixK。是正确的。

Also see Jurgeon D's answer on Kinect SDK player detection, as it deals with skeleton index. @Fixus is also right in that you could use a ID. But if you mean more than 2 people are detected, then only one is detected, that is not programming, that is in the Kinect's hardware and @FelixK. was right.

void nui_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e) 
{
    SkeletonFrame sf = e.SkeletonFrame;
    //check which skeletons in array are active and
    // use that array indexes for player index
    SkeletonData player1 = sf.Skeletons[playerIndex1];
    SkeletonData player2 = sf.Skeletons[playerIndex2];
}

骨架的ID

void nui_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
{
    SkeletonFrame sf = e.SkeletonFrame;

    if (sf.TrackingState == SkeletalTrackingState.Tracked)
     {
          int ID1 = sf.TrackingID;
     }

另外,code用于检测人类

 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)
 {
     //do something
 }      

这篇关于Kinect的用户检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆