public void InitializeSkeletalStream() { skeletonHandler = SkeletonHandler.Instance; skeletonHandler.SkeletonHandlerSet(this.kinectSensor.DepthFrameSource.FrameDescription.Width, this.kinectSensor.DepthFrameSource.FrameDescription.Height, this.kinectSensor.CoordinateMapper); // open the reader for the body frames this.bodyFrameReader = this.kinectSensor.BodyFrameSource.OpenReader(); this.skeletalImage = skeletonHandler.getImageSource(); }
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); }