Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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);
        }