Exemplo n.º 1
0
        public void Update(DepthFrameData frame)
        {
            if (width != frame.Width || height != frame.Height)
            {
                logger.Error("Size of DepthFrame does not match. Expected: {0}x{1}, Actual: {2}x{3}",
                    width, height, frame.Width, frame.Height);
            }
            else
            {
                var dataBytes = Array.ConvertAll(frame.Data, d => MapDepthToByte(d, frame.MinReliableDistance, frame.MaxReliableDistance));

                bitmap.Lock();

                bitmap.WritePixels(
                        new Int32Rect(0, 0, bitmap.PixelWidth, bitmap.PixelHeight),
                        dataBytes,
                        bitmap.PixelWidth,
                        0);

                bitmap.Unlock();
            }
        }
Exemplo n.º 2
0
 public DepthFrameUpdatedEventArgs(DepthFrameData frame)
 {
     Frame = frame;
 }