SDKのメモ
Microsoft.Kinect.Nui関係のメモメモ。
Blog「kinelog」のほうがメインです、ここは草稿置き場。
Runtime()初期化の仕様変更
Beta1→Beta2への移行作業中。
this.kinect= new Runtime();
このような指定をすると
'Microsoft.Research.Kinect.Nui.Runtime.Runtime()' は古い形式です: 'This constructor to be removed. Use Runtime.Kinects[0] instead.'
という警告が出ます。
【解決方法・詳細はこちら】 http://www.shirai.la/project/kinect/kinelog/20111107-runtime
RuntimeOptions
UseColor カラー画像を使用
UseDepth 奥行画像を使用
UseDepthAndPlayerIndex プレイヤーインデックスを使用
UseSkeletalTracking 骨格トラッキングを使用
(使用例)
//Kinectの動作モードの設定。ここではカラー画像(Video)のみ取得
kinect.Initialize(RuntimeOptions.UseColor);
this.kinect.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);
ImageStreamType //実はColorモードだとサポートしていない解像度がある
public enum ImageResolution {
Invalid = -1,
Resolution80x60 = 0, //colorで動作しない
Resolution320x240 = 1, //colorで動作しない
Resolution640x480 = 2, //colorで動作
Resolution1280x1024 = 3, //colorで動作
}
ImageType
Color
ColorYuv
ColorYuvRaw,
Depth
DepthAndPlayerIndex