使用 kinect 进行骨骼跟踪中的真实世界坐标是多少。如何找到脊柱关节的确切位置.Z
.
您可以使用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:准确查找用户身高 也试试
和一篇很好的Kinect 入门文章。