Ejemplo n.º 1
0
        /// <summary>
        /// We call Freeze() so we can write these bitmaps to disk from other threads.
        /// </summary>
        /// <param name="frame"></param>
        /// <param name="serializer"></param>
        public void Update(LiveFrame frame, FrameSerializer serializer)
        {
            // (1) Depth mapping
            _depthMapping = serializer.CaptureMappedFrame(frame, _bufferDepthMapping);

            // (2) Depth
            _depth = serializer.CaptureDepthFrameBitmap(frame, _bufferDepth);
            _depth.Item1.Freeze();

            // (3) Infrared
            _infrared = serializer.CaptureInfraredFrameBitmap(frame, _bufferInfrared);
            _infrared.Item1.Freeze();

            // (4) Skeleton
            _skeleton = serializer.SerializeSkeletonData(frame);

            // (5) Color
            _color = serializer.CaptureColorFrameBitmap(frame, _bufferColor);
            _color.Item1.Freeze();

            // (6) Body index
            _bodyIndex = serializer.CaptureBodyIndexFrameBitmap(frame, _bufferBodyIndex);
            _bodyIndex.Item1.Freeze();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// We call Freeze() so we can write these bitmaps to disk from other threads.
        /// </summary>
        /// <param name="frame"></param>
        /// <param name="serializer"></param>
        public void Update(LiveFrame frame, FrameSerializer serializer)
        {
            // (1) Depth mapping
            _depthMapping = serializer.CaptureMappedFrame(frame, _bufferDepthMapping);

            // (2) Depth
            _depth = serializer.CaptureDepthFrameBitmap(frame, _bufferDepth);
            _depth.Item1.Freeze();

            // (3) Infrared
            _infrared = serializer.CaptureInfraredFrameBitmap(frame, _bufferInfrared);
            _infrared.Item1.Freeze();

            // (4) Skeleton
            _skeleton = serializer.SerializeSkeletonData(frame);

            // (5) Color
            _color = serializer.CaptureColorFrameBitmap(frame, _bufferColor);
            _color.Item1.Freeze();

            // (6) Body index
            _bodyIndex = serializer.CaptureBodyIndexFrameBitmap(frame, _bufferBodyIndex);
            _bodyIndex.Item1.Freeze();
        }