-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