Kinect:找到第一个跟踪人并忽略其余的人 [英] Kinect: IDing the first track person and ignoring the rest
问题描述
无论如何,在下面的代码后面是第一个跟踪骨架的ID吗?
骨架首先=(从s中骨架
           &NBSP ;                        &NBSP ;其中s.TrackingState == SkeletonTrackingState.Tracked
                                      选择多个).FirstOrDefault();
在识别第一个跟踪骨架后,如何在渲染空间中绘制它。
提前致谢
Zong li
< blockquote>
Skeleton-Basics示例提供了在WPF中绘制骨架所需的代码。如果您使用其他框架,则可以调整代码以使其适合。
您拥有的代码片段将始终提供您的第一个.Tracked骨架,无论ID如何。您必须迭代骨架集合并将trackingID与您想要的traceID进行比较。如果2匹配,那么你有正确的骨架,并且可以在循环中打破
。
了解如何选择要跟踪的用户:
http://msdn.microsoft.com/en-us/library/jj131025.aspx #Active_User_Tracking
Hi is there anyway to ID the first track skeleton after the below code?
Skeleton First = (from s in skeletons
where s.TrackingState == SkeletonTrackingState.Tracked
select s).FirstOrDefault();
After IDing the first tracked skeleton how can i draw it out on the render space.
Thanks in advance
Zong li
The Skeleton-Basics sample provides the code you need to draw a skeleton in WPF. If you use another framework, you can adapt the code to fit.
The code snippet you have will always provide your the first .Tracked skeleton regardless of the ID. You have to iterate the skeleton collection and compare the trackingID to the one you want. If the 2 match, then you have the correct skeleton and can break out of the loop.
see how to select users to track:
http://msdn.microsoft.com/en-us/library/jj131025.aspx#Active_User_Tracking
这篇关于Kinect:找到第一个跟踪人并忽略其余的人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!