public void ProcessFrame(Frame frame)
        {
            if (Mode == GestureType.Static)
            {
                var distances = _classifier.GetDistancesFromAllClasses(new SGInstance(frame));
                RankedStaticGestures = new ObservableCollection <GestureDistance>(distances.OrderBy(g => g.Value).Select(g => new GestureDistance(g.Key.Name, g.Value)));
            }
            else
            {
                _dgRecorder.ProcessFrame(frame);
                CurrentState = _dgRecorder.State;
                switch (CurrentState)
                {
                case DGRecorderState.RecordingJustFinished:
                    if (_dgRecorder.MostRecentInstance.Samples.Count == 0)
                    {
                        break;
                    }

                    var distances = _classifier.GetDistancesFromAllClasses(_dgRecorder.MostRecentInstance);
                    RankedDynamicGestures = new ObservableCollection <GestureDistance>(distances.OrderBy(g => g.Value).Select(g => new GestureDistance(g.Key.Name, g.Value)));
                    break;
                }
            }
        }
 public void ProcessFrame(Frame frame)
 {
     if (RecordingInProgress)
     {
         _recorder.ProcessFrame(frame);
         CurrentDGRecorderState = _recorder.State;
         NewInstancesCount      = _recorder.Instances.Count;
     }
 }