Skip to content

Instantly share code, notes, and snippets.

@TakashiYoshinaga
Created December 5, 2019 02:20
Show Gist options
  • Save TakashiYoshinaga/d6a3de3be10a4545cf651cf020c69751 to your computer and use it in GitHub Desktop.
Save TakashiYoshinaga/d6a3de3be10a4545cf651cf020c69751 to your computer and use it in GitHub Desktop.
Initialization of color and depth image
private void InitBitmap()
{
//(追加1)カラー画像の横幅(width)と縦幅(height)を取得
int width = kinect.GetCalibration().DepthCameraCalibration.ResolutionWidth;
int height = kinect.GetCalibration().DepthCameraCalibration.ResolutionHeight;
//(追加2)PictureBoxに貼り付けるBitmap画像を作成。サイズはkinectのカラー画像と同じ
colorBitmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
depthBitmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment