本文整理汇总了C#中CoordinateMapper.MapDepthPointToSkeletonPoint方法的典型用法代码示例。如果您正苦于以下问题:C# CoordinateMapper.MapDepthPointToSkeletonPoint方法的具体用法?C# CoordinateMapper.MapDepthPointToSkeletonPoint怎么用?C# CoordinateMapper.MapDepthPointToSkeletonPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoordinateMapper
的用法示例。
在下文中一共展示了CoordinateMapper.MapDepthPointToSkeletonPoint方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TransformDepthTo3D
public void TransformDepthTo3D( Byte [] data )
{
CoordinateMapper mapper = new CoordinateMapper( device );
DepthImagePoint pixels = new DepthImagePoint();
SkeletonPoint [] points = new SkeletonPoint[ 320 * 120 ];
var p = mapper.MapDepthPointToSkeletonPoint( DepthImageFormat.Resolution640x480Fps30,
pixels );
}
示例2: ToColorSpace
public OpenTK.Vector3[] ToColorSpace(CoordinateMapper mapper, IEnumerable<DepthImagePoint> points, DepthImageFormat format, float zTune = 1)
{
var sps = points.Select(p => mapper.MapDepthPointToSkeletonPoint(format, p)).ToArray();
var dist = sps.Select(p => mapper.MapSkeletonPointToColorPoint(p, ColorImageFormat.RgbResolution1280x960Fps12))
.Select(cp => new PointF((1280 - cp.X), cp.Y)).ToArray();
return StereoCalibration.Undistort(calib, dist).Zip(sps, (p, s) => new OpenTK.Vector3(p.X * s.Z * zTune, p.Y * s.Z * zTune, s.Z * zTune)).ToArray();
}
示例3: DetermineCoordinate
public SkeletonPoint DetermineCoordinate(Contour<Drawing.Point> contour)
{
SkeletonPoint kinectCoordinate;
DepthImagePoint featurePoint = new DepthImagePoint();
CoordinateMapper changeCoordinate = new CoordinateMapper(sensorChooser.Kinect);
Drawing.Point middlePoint = new Drawing.Point(0, 0);
for (int i = 0; i < contour.Total; i++)
{
middlePoint.X += contour[i].X;
middlePoint.Y += contour[i].Y;
}
featurePoint.X = middlePoint.X / contour.Total;
featurePoint.Y = middlePoint.Y / contour.Total;
kinectCoordinate = changeCoordinate.MapDepthPointToSkeletonPoint(DepthImageFormat.Resolution640x480Fps30, featurePoint);
return (kinectCoordinate);
}
示例4: GetSkeletonSpacePosition
/// <summary>
/// Calculates the position of a point on screen (depth image) in skeleton space
/// </summary>
/// <param name="p">point on screen (depth image)</param>
/// <param name="DepthValue">Depth value of point</param>
/// <param name="nui">active nui runtime</param>
/// <param name="panel">panel on which the screen point lies</param>
/// <returns></returns>
public static NUIVector GetSkeletonSpacePosition(this Point p, short DepthValue, KinectSensor nui, Canvas panel)
{
DepthImagePoint dip = new DepthImagePoint { Depth = DepthValue, X = (int)p.X, Y = (int)p.Y };
CoordinateMapper cm = new CoordinateMapper(nui);
return cm.MapDepthPointToSkeletonPoint(nui.DepthStream.Format, dip);
//return nui.SkeletonEngine.DepthImageToSkeleton((float)(p.X/panel.ActualWidth), (float)(p.Y/panel.ActualHeight), DepthValue);
}