ArtofKinectRecorder.Views.RawFrameViewer.UpdateMotionFrame C# (CSharp) Method

UpdateMotionFrame() public method

public UpdateMotionFrame ( DeviceConfiguration config, MotionFrame frame ) : void
config DeviceConfiguration
frame MotionFrame
return void
        public void UpdateMotionFrame(DeviceConfiguration config, MotionFrame frame)
        {
            if (!Dispatcher.CheckAccess())
            {
                Dispatcher.BeginInvoke((Action)delegate
                {
                    UpdateMotionFrame(config, frame);
                });
                return;
            }

            sensorImage.ProcessDepthFrame(frame.DepthFrame);
            depthImage.Source = sensorImage.DepthImageSource;
            rgbImage.Source = frame.RGBFrame.AsRgbBitmapSource();
            skeletonImage.Source = frame.Skeletons.AsSkeletonBitmapSource(frame.DepthFrame.Width, frame.DepthFrame.Height);
        }