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);
}