骨架中的真实世界坐标

时间:2013-04-11 05:12:59

标签: wpf kinect

使用kinect进行骨架跟踪的真实世界坐标是什么。如何找到脊柱关节的确切位置.Z

1 个答案:

答案 0 :(得分:0)

您可以使用SkeletonFrameReady事件获取每个框架中的具体位置:

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

            if (sf != null)
            {
                Skeleton[] allSkeletons = new Skeleton[6];
                sf.CopySkeletonDataTo(allSkeletons);
                Skeleton[] tracked = (Skeleton[]) (
                    from s in allSkeletons
                    where s.TrackingState == SkeletonTrackingState.Tracked
                    select s
                );

                Skeleton first = (
                    from s in allSkeletons
                    where s.TrackingState == SkeletonTrackingState.Tracked
                    select s
                ).FirstOrDefault();

                if (first != null)
                {

                   var Spinepos=first.Joints[JointType.Spine].Position.Z;
                }
            }

有一篇文章Kinect for Windows: Find user height accurately 也试试

  1. Kinect SDK player detection
  2. Kinect user Detection
  3. 和一篇好的Kinect Getting Started文章。