-1
可能重复:
Converting Kinect Methods from Beta 2, to Version 1Kinect的SDK 1.5 getDisplayPosition方法
在Kinect的SDK的β2,有得到关节的显示位置的方法。在kinect sdk 1.5有没有一种方法可以做同样的事情,或者我必须写一个新的方法吗?
private Point getDisplayPosition(Joint joint)
{
float depthX, depthY;
_kinectNui.SkeletonEngine.SkeletonToDepthImage(joint.Position, out depthX, out depthY);
depthX = Math.Max(0, Math.Min(depthX * 320, 320)); //convert to 320, 240 space
depthY = Math.Max(0, Math.Min(depthY * 240, 240)); //convert to 320, 240 space
int colorX, colorY;
ImageViewArea iv = new ImageViewArea();
// only ImageResolution.Resolution640x480 is supported at this point
_kinectNui.NuiCamera.GetColorPixelCoordinatesFromDepthPixel(ImageResolution.Resolution640x480, iv, (int)depthX, (int)depthY, (short)0, out colorX, out colorY);
// map back to skeleton.Width & skeleton.Height
return new Point((int)(imageContainer.Width * colorX/640.0) , (int)(imageContainer.Height * colorY/480));
}
此方法取自Kinect Skeleton。
见http://stackoverflow.com/questions/10367582/converting-kinect-methods-from-beta-2-to-version-1,因为它是同样的问题,有一个答案。 – 2012-07-10 12:52:41
我忙着为你的'FullAjaxExceptionHandler'问题输入一个答案,并且你删除了它。:)好吧,答案由http://stackoverflow.com/questions/3909267/differences-between-action-and-actionlistener/覆盖3909382#3909382 – BalusC 2013-06-25 11:42:39
@BalusC对不起:DI只是意识到问题是关于ajax和非ajax按钮。 http://stackoverflow.com/questions/17296420/primefaces-fullajaxexceptionhandler-ajax-request – hellzone 2013-06-25 11:46:25