1

XNAで公式のKinectSDK1.5を使用したプログラミングは初めてです。スケルトンジョイントの位置をXNA2D画面にマッピングして、画像ストリームに一致させるにはどうすればよいですか?

4

1 に答える 1

2

Kinect SDKにはいくつかのマッピングヘルパーメソッドが用意されているため、これは非常に簡単です。

MapSkeletonPointToColorは、2DカラーフレームでのSkeletonPointの位置を示します。スケルトンポイントとターゲットカラーフレームフォーマットの2つの引数を渡すだけです。

foreach (Joint joint in skeleton.Joints)
{
    // Transforms a SkeletonPoint to a ColorImagePoint
    var colorPoint = Kinect.MapSkeletonPointToColor(joint.Position, Kinect.ColorStream.Format);

    // colorPoint has two properties : X and Y which gives you the positions in the 2D color frame.
    // TODO : Do something with the colorPoint value. 
}
于 2012-10-05T23:22:21.307 に答える