坐标空间及空间转换——随手记

 

坐标空间

 

 

空间转换

将骨骼数据转换到UI空间中

使用KinectSensor对象的 MapSkeletonPointToDepth方法

 

骨骼数据镜面对称

private Point GetJointPoint(Joint joint)
{
    DepthImagePoint point = this.KinectDevice.MapSkeletonPointToDepth(joint.Position, this.KinectDevice.DepthStream.Format);
    point.X *= -1*(int) this.LayoutRoot.ActualWidth / KinectDevice.DepthStream.FrameWidth;
    point.Y *= (int) this.LayoutRoot.ActualHeight / KinectDevice.DepthStream.FrameHeight;
                        
    return new Point(point.X, point.Y);
} 

 

 

posted @ 2013-04-19 15:08  十一_x  阅读(326)  评论(0编辑  收藏  举报