2013-04-09 42 views

回答

0

,據我所知,沒有跟蹤旋轉的方式。你可以這樣做的最好方法是比較左肩和右肩,或左髖和右髖,並確定每個Z軸看哪個更接近,然後你就可以知道身體以哪種方式被旋轉。

1

絕對Kinect SDK使用面部跟蹤提供頭對X,Y和Z軸的旋轉。

  • OnFrameReady方法,請Kinect感應構造FaceTracker對象作爲其參數。

this.faceTracker = new FaceTracker(kinectSensor);

  • 創建使用.Track()facetracker方法FaceTrackFrame對象。
FaceTrackFrame frame = this.faceTracker.Track(colorImageFormat, colorImage, depthImageFormat, depthImage, skeletonOfInterest); 
  • 獲取X,Y,Z頭旋轉軸:

浮子yRotation = frame.Rotation.Y;

float xRotation = frame.Rotation.X;

float zRotation = frame.Rotation.Z;

FYI關於使用人臉跟蹤頭部轉動,這裏是文檔: http://msdn.microsoft.com/en-us/library/jj130970.aspx

關於轉動身體,我沒有嘗試過它的任何實驗。