Exemplo n.º 1
0
 // initialize color stream
 public void InitializeColorStream()
 {
     this.colorFrameReader = this.kinectSensor.ColorFrameSource.OpenReader();
     colorHandler          = ColorHandler.Instance;
     colorHandler.ColorHandlerSet(this.kinectSensor.ColorFrameSource.CreateFrameDescription(ColorImageFormat.Bgra)); //, _lock);
     this.colorBitmap = new WriteableBitmap(colorHandler.Width, colorHandler.Height, 96.0, 96.0, PixelFormats.Bgr32, null);
 }
Exemplo 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);
        }