public void InitializeDepthStream() { this.depthFrameReader = this.kinectSensor.DepthFrameSource.OpenReader(); depthHandler = DepthHandler.Instance; depthHandler.DepthHandlerSet(this.kinectSensor.DepthFrameSource.FrameDescription); this.infraredDepthBitmap = new WriteableBitmap(depthHandler.Width, depthHandler.Height, 96.0, 96.0, PixelFormats.Gray16, null); depthHandler.SetShowState(true); }
public PreviewWindow() { InitializeComponent(); ch = ColorHandler.Instance; ch.openReader(); bh = BodyIndexHandler.Instance; bh.openReader(); dh = DepthHandler.Instance; dh.startReading(); ih = InfraredHandler.Instance; ih.startReading(); sh = SkeletonHandler.Instance; sh.openReader(); depthPreviewBitmap = new WriteableBitmap(dh.Width, dh.Height, 96.0, 96.0, PixelFormats.Gray16, null); infraredPreviewBitmap = new WriteableBitmap(ih.Width, ih.Height, 96.0, 96.0, PixelFormats.Gray16, null); ComponentDispatcher.ThreadIdle += new System.EventHandler(ComponentDispatcher_ThreadIdle); }