public MapSkeletonPointToDepthPoint ( Microsoft.Kinect.SkeletonPoint sp ) : DepthImagePoint | ||
sp | Microsoft.Kinect.SkeletonPoint | |
return | DepthImagePoint |
/// <summary> /// Computes the head circle in the depth image. /// </summary> /// <param name="skeleton"></param> /// <param name="mapper"></param> /// <returns></returns> public static FaceModel GetFaceModel(Skeleton skeleton, CoordinateConverter mapper) { var headJointPos = GetJoint(skeleton, JointType.Head).Position; var shoulderCenterJoint = GetJoint(skeleton, JointType.ShoulderCenter); var headDepthPt = mapper.MapSkeletonPointToDepthPoint(headJointPos); var shoulderDepthPt = mapper.MapSkeletonPointToDepthPoint(shoulderCenterJoint.Position); var radius = Math.Abs(shoulderDepthPt.Y - headDepthPt.Y) / 2; return(new FaceModel(GeometryUtil.Midpoint(headDepthPt, shoulderDepthPt), radius)); }
/// <summary> /// Computes the head circle in the depth image. /// </summary> /// <param name="skeleton"></param> /// <param name="mapper"></param> /// <returns></returns> public static FaceModel GetFaceModel(Skeleton skeleton, CoordinateConverter mapper) { var headJointPos = GetJoint(skeleton, JointType.Head).Position; var shoulderCenterJoint = GetJoint(skeleton, JointType.ShoulderCenter); var headDepthPt = mapper.MapSkeletonPointToDepthPoint(headJointPos); var shoulderDepthPt = mapper.MapSkeletonPointToDepthPoint(shoulderCenterJoint.Position); var radius = Math.Abs(shoulderDepthPt.Y - headDepthPt.Y) / 2; return new FaceModel(GeometryUtil.Midpoint(headDepthPt, shoulderDepthPt), radius); }