示例#1
0
        public KinectHandler(KinectData kinect, Device comInterface)
        {
            if (Log == null)
            {
                return;
            }
            Log.Info("Initializing Framework");

            _comInterface = comInterface;
            _kinect       = kinect;

            if (_kinect != null && _kinect.GetSensor() == null)
            {
                Log.Error("Kinect not initialized, Cannot continue.");
                return;
            }

            _commands = FileLoader.LoadVoiceCommands();
            if (_commands == null)
            {
                return;
            }
            _vocCom = new VoiceCommander(_commands);
            _vocCom.OrderDetected += VoiceCommandDetected;
        }
示例#2
0
        private void Clean()
        {
            swipeGestureRecognizer.OnGestureDetected -= OnGestureDetected;

            CloseGestureDetector();

            ClosePostureDetector();

            if (voiceCommander != null)
            {
                voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
                voiceCommander.Dispose();
                voiceCommander = null;
            }

            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }

            if (kinectRuntime != null)
            {
                kinectRuntime.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectRuntime.VideoFrameReady -= kinectRuntime_VideoFrameReady;
                kinectRuntime.Uninitialize();
                kinectRuntime = null;
            }
        }
示例#3
0
        private void Clean()
        {
            swipeGestureRecognizer.OnGestureDetected -= OnGestureDetected;

            CloseGestureDetector();

            ClosePostureDetector();

            if (voiceCommander != null)
            {
                voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
                voiceCommander.Dispose();
                voiceCommander = null;
            }

            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }

            if (kinectRuntime != null)
            {
                kinectRuntime.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectRuntime.VideoFrameReady    -= kinectRuntime_VideoFrameReady;
                kinectRuntime.Uninitialize();
                kinectRuntime = null;
            }
        }
        private void Initialize()
        {
            if (kinectSensor == null)
            {
                return;
            }

            audioManager = new AudioStreamManager(kinectSensor.AudioSource);
            audioBeamAngle.DataContext = audioManager;

            kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
            kinectSensor.ColorFrameReady += kinectRuntime_ColorFrameReady;

            kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution320x240Fps30);
            kinectSensor.DepthFrameReady += kinectSensor_DepthFrameReady;

            kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
            {
                Smoothing          = 0.5f,
                Correction         = 0.5f,
                Prediction         = 0.5f,
                JitterRadius       = 0.05f,
                MaxDeviationRadius = 0.04f
            });
            kinectSensor.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;

            swipeGestureRecognizer = new SwipeGestureDetector();
            swipeGestureRecognizer.OnGestureDetected += OnGestureDetected;

            skeletonDisplayManager = new SkeletonDisplayManager(kinectSensor, kinectCanvas);

            kinectSensor.Start();

            LoadCircleGestureDetector();
            LoadLetterTPostureDetector();
            LoadTriGestureDetector();
            //Add Triangle

            nuiCamera = new BindableNUICamera(kinectSensor);

            elevationSlider.DataContext = nuiCamera;

            voiceCommander = new VoiceCommander("record", "stop");
            voiceCommander.OrderDetected += voiceCommander_OrderDetected;

            StartVoiceCommander();

            kinectDisplay.DataContext = colorManager;

            parallelCombinedGestureDetector = new ParallelCombinedGestureDetector();
            parallelCombinedGestureDetector.OnGestureDetected += OnGestureDetected;
            parallelCombinedGestureDetector.Add(swipeGestureRecognizer);
            parallelCombinedGestureDetector.Add(circleGestureRecognizer);
            parallelCombinedGestureDetector.Add(triangleGestureRecognizer);

            //Add Triangle
            //Media_Loaded();
            //btnVideo_Click();
        }
        public StatusBarViewModel(VoiceCommander commander)
        {
            _SynchronizationContext = SynchronizationContext.Current;

            VoiceCommanderStateStatus           = commander.StateStatus;
            VoiceCommanderSpeechRecognizerState = commander.SpeechRecognizerState;

            commander.VoiceCommanderSpeechRecognizerStateChanged += VoiceCommanderSpeechRecognizerStateChanged;
            commander.VoiceCommanderStateStatusChanged           += VoiceCommanderStateStatusChanged;
        }
        private void Clean()
        {
            if (swipeGestureRecognizer != null)
            {
                swipeGestureRecognizer.OnGestureDetected -= OnGestureDetected;
            }

            if (audioManager != null)
            {
                audioManager.Dispose();
                audioManager = null;
            }

            if (parallelCombinedGestureDetector != null)
            {
                parallelCombinedGestureDetector.Remove(swipeGestureRecognizer);
                parallelCombinedGestureDetector.Remove(circleGestureRecognizer);
                parallelCombinedGestureDetector.Remove(triangleGestureRecognizer);

                parallelCombinedGestureDetector = null;
                //Add Triangle
            }

            CloseGestureDetector();

            ClosePostureDetector();

            if (voiceCommander != null)
            {
                voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
                voiceCommander.Stop();
                voiceCommander = null;
            }

            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }

            if (eyeTracker != null)
            {
                eyeTracker.Dispose();
                eyeTracker = null;
            }

            if (kinectSensor != null)
            {
                kinectSensor.DepthFrameReady    -= kinectSensor_DepthFrameReady;
                kinectSensor.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectSensor.ColorFrameReady    -= kinectRuntime_ColorFrameReady;
                kinectSensor.Stop();
                kinectSensor = null;
            }
        }
示例#7
0
 void MainScreenView_Loaded(object sender, RoutedEventArgs e)
 {
     KinectWrapper.KinectAllFramesReady += new EventHandler <AllFramesReadyEventArgs>(KinectWrapper_KinectAllFramesReady);
     InitializeLetters();
     swipeGestureDetector.OnGestureDetected += new Action <string>(detector_OnGestureDetected);
     kinectColorViewer.Kinect    = KinectWrapper.KinectSensor;
     kinectSkeletonViewer.Kinect = KinectWrapper.KinectSensor;
     kinectDepthViewer.Kinect    = KinectWrapper.KinectSensor;
     voiceCommander = new VoiceCommander("stop");
     voiceCommander.OrderDetected += new Action <string>(voiceCommander_OrderDetected);
     voiceCommander.Start(KinectWrapper.KinectSensor);
 }
    //Requette
    //Constructeur
    /* public SerialPort getPort()
    {

        return port;
    }*/
    static void Main(string[] args)
    {
        MainClass mClass = new MainClass ();
        mClass.sensor = KinectSensor.KinectSensors [0];
        mClass.sensor.Start ();
        VoiceCommander voiceCommander = new VoiceCommander ("start", "close", "move");
        voiceCommander.OrderDetected += mClass.voiceCommander_OrderDetected;

        voiceCommander.Start (mClass.sensor);
           // mClass.getPort().Open();
        while (true)
        {

        }
    }
示例#9
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            circleKBPath   = Path.Combine(Environment.CurrentDirectory, @"data\circleKB.save");
            letterT_KBPath = Path.Combine(Environment.CurrentDirectory, @"data\t_KB.save");
            try
            {
                kinectRuntime = new Runtime();
                kinectRuntime.Initialize(RuntimeOptions.UseSkeletalTracking | RuntimeOptions.UseColor);
                kinectRuntime.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);
                kinectRuntime.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;
                kinectRuntime.VideoFrameReady    += kinectRuntime_VideoFrameReady;

                swipeGestureRecognizer.OnGestureDetected += OnGestureDetected;

                skeletonDisplayManager = new SkeletonDisplayManager(kinectRuntime.SkeletonEngine, kinectCanvas);

                kinectRuntime.SkeletonEngine.TransformSmooth = true;
                var parameters = new TransformSmoothParameters
                {
                    Smoothing          = 1.0f,
                    Correction         = 0.1f,
                    Prediction         = 0.1f,
                    JitterRadius       = 0.05f,
                    MaxDeviationRadius = 0.05f
                };
                kinectRuntime.SkeletonEngine.SmoothParameters = parameters;

                LoadCircleGestureDetector();
                LoadLetterTPostureDetector();

                nuiCamera = new BindableNUICamera(kinectRuntime.NuiCamera);

                elevationSlider.DataContext = nuiCamera;

                voiceCommander = new VoiceCommander("record", "stop");
                voiceCommander.OrderDetected += voiceCommander_OrderDetected;

                StartVoiceCommander();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#10
0
        private void Clean()
        {
            if (this.voice != null)
            {
                this.voice.OrderDetected -= Voice_OrderDetected;
                this.voice.Stop();
                this.voice = null;
            }

            if (this.listener != null)
            {
                this.listener.Clean();
            }

            if (this.kinect != null)
            {
                this.kinect.SkeletonFrameReady -= Kinect_SkeletonFrameReady;
                this.kinect.Stop();
                this.kinect = null;
            }
        }
示例#11
0
        private void Initialize()
        {
            if (kinectRuntime == null)
            {
                return;
            }

            kinectRuntime.Initialize(RuntimeOptions.UseSkeletalTracking | RuntimeOptions.UseColor);
            kinectRuntime.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);
            kinectRuntime.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;
            kinectRuntime.VideoFrameReady    += kinectRuntime_VideoFrameReady;

            swipeGestureRecognizer.OnGestureDetected += OnGestureDetected;

            skeletonDisplayManager = new SkeletonDisplayManager(kinectRuntime.SkeletonEngine, kinectCanvas);

            kinectRuntime.SkeletonEngine.TransformSmooth = true;
            var parameters = new TransformSmoothParameters
            {
                Smoothing          = 1.0f,
                Correction         = 0.1f,
                Prediction         = 0.1f,
                JitterRadius       = 0.05f,
                MaxDeviationRadius = 0.05f
            };

            kinectRuntime.SkeletonEngine.SmoothParameters = parameters;

            LoadCircleGestureDetector();
            LoadLetterTPostureDetector();

            nuiCamera = new BindableNUICamera(kinectRuntime.NuiCamera);

            elevationSlider.DataContext = nuiCamera;

            voiceCommander = new VoiceCommander("record", "stop");
            voiceCommander.OrderDetected += voiceCommander_OrderDetected;

            StartVoiceCommander();
        }
 //Main , point d'entrée du Programme
 static void main(string[] Args)
 {
     //Instanciation d'un objet Init et Voice => voir Class
     Init init = new Init();
     Voice voice = new Voice(init);
     //on initialise les composants a partir de la méthode initializ
     //de l'objet init
     init.initializ();
     //on instancie un objet VoiceCommander avec les 3 ordres
     //a reconnaitre
     VoiceCommander voiceCommander =
     new VoiceCommander("open", "close", "move");
     //On implémente voiceCommander_OrderDetected par l'Action
     //OrderDetected : si un ordre est reconnu on lance la méthode
        	 	voiceCommander.OrderDetected +=
         voice.voiceCommander_OrderDetected;
     //On démare la reconnaissance vocale.
        	 	voiceCommander.Start(init.getKinectSensor());
     //Boucle d'attente.
     while (true){
     }
 }
示例#13
0
        private void Initialize()
        {
            if (this.kinect == null) return;

            this.kinect.SkeletonStream.Enable(new TransformSmoothParameters
            {
                Smoothing = 0.5f,
                Correction = 0.5f,
                Prediction = 0.5f,
                JitterRadius = 0.05f,
                MaxDeviationRadius = 0.04f
            });
            this.kinect.SkeletonFrameReady += Kinect_SkeletonFrameReady;
            this.listener = new KinectListener();

            this.voice = new VoiceCommander("sanbox iniciar", "sanbox empezar", "sanbox finalizar", "sanbox terminar",
                "sanbox ver temas", "sanbox volver", "sanbox tema uno", "sanbox tema dos", "sanbox tema tres",
                "sanbox tema cuatro", "sanbox tema cinco", "sanbox tema seis", "sanbox tema siete",
                "sanbox tema ocho", "sanbox tema nueve", "sanbox tema diez", "sanbox tema once", "sanbox tema doce",
                "sanbox anotar", "sanbox ayuda");
            this.voice.OrderDetected += Voice_OrderDetected;

            Start();
        }
示例#14
0
 public ModuleManager(IUnityContainer container, VoiceCommander commander)
 {
     _Container = container;
     _Commander = commander;
 }
示例#15
0
        private void Initialize()
        {
            if (kinectRuntime == null)
                return;

            kinectRuntime.Initialize(RuntimeOptions.UseSkeletalTracking | RuntimeOptions.UseColor);
            kinectRuntime.VideoStream.Open(ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);
            kinectRuntime.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;
            kinectRuntime.VideoFrameReady += kinectRuntime_VideoFrameReady;

            swipeGestureRecognizer.OnGestureDetected += OnGestureDetected;

            skeletonDisplayManager = new SkeletonDisplayManager(kinectRuntime.SkeletonEngine, kinectCanvas);

            kinectRuntime.SkeletonEngine.TransformSmooth = true;
            var parameters = new TransformSmoothParameters
            {
                Smoothing = 1.0f,
                Correction = 0.1f,
                Prediction = 0.1f,
                JitterRadius = 0.05f,
                MaxDeviationRadius = 0.05f
            };
            kinectRuntime.SkeletonEngine.SmoothParameters = parameters;

            LoadCircleGestureDetector();
            LoadLetterTPostureDetector();

            nuiCamera = new BindableNUICamera(kinectRuntime.NuiCamera);

            elevationSlider.DataContext = nuiCamera;

            voiceCommander = new VoiceCommander("record", "stop");
            voiceCommander.OrderDetected += voiceCommander_OrderDetected;

            StartVoiceCommander();
        }
示例#16
0
        private void CreateAndInitializeDefaultGestureRecognizers()
        {
            rightHandSwipeDetector = new SwipeGestureDetector();
            rightHandSwipeDetector.OnGestureDetected += OnRightGestureDetected;

            leftHandSwipeDetector = new SwipeGestureDetector();
            leftHandSwipeDetector.OnGestureDetected += OnLeftGestureDetected;

            File.Copy(@"..\..\SupportingFiles\default.csv", Environment.CurrentDirectory + @"\default.csv", true);
            ParseConfigs(Environment.CurrentDirectory + @"\default.csv");

            voiceCommander = new VoiceCommander(keyWords);
            voiceCommander.OrderDetected += voiceCommander_OrderDetected;

            devicesComboBox.ItemsSource = midMan.GetTheListOfMidiDevices();
            devicesComboBox.SelectedItem = midMan.CurrentOutputDeviceName();

            System.IO.StreamReader fileToRead = new StreamReader(Environment.CurrentDirectory + @"\cache.txt");
            lastConfigFilePath = fileToRead.ReadLine();
            lastMIDIPath = fileToRead.ReadLine();
            fileToRead.Close();
        }
示例#17
0
        private void Clean()
        {
            if (swipeGestureRecognizer != null)
            {
                swipeGestureRecognizer.OnGestureDetected -= OnGestureDetected;
            }

            if (audioManager != null)
            {
                audioManager.Dispose();
                audioManager = null;
            }

            if (parallelCombinedGestureDetector != null)
            {
                parallelCombinedGestureDetector.Remove(swipeGestureRecognizer);
                parallelCombinedGestureDetector.Remove(circleGestureRecognizer);
                parallelCombinedGestureDetector = null;
            }

            CloseGestureDetector();

            ClosePostureDetector();

            if (voiceCommander != null)
            {
                voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
                voiceCommander.Stop();
                voiceCommander = null;
            }

            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }

            if (eyeTracker != null)
            {
                eyeTracker.Dispose();
                eyeTracker = null;
            }

            if (kinectSensor != null)
            {
                kinectSensor.DepthFrameReady -= kinectSensor_DepthFrameReady;
                kinectSensor.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                kinectSensor.Stop();
                kinectSensor = null;
            }
        }
        private void Clean()
        {
            // ADD other session summary information to M3.

            // Leave M3 Smart Space
            if (connectedToSmartSpace) 
                System.Console.WriteLine("--- Leaving M3 Smart Space... " + M3.leave());
            
            if (swipeGestureRecognizer != null)
            {
                swipeGestureRecognizer.OnGestureDetected -= OnGestureDetected;
            }
            if (audioManager != null)
            {
                audioManager.Dispose();
                audioManager = null;
            }
            CloseGestureDetector();
            ClosePostureDetector();
            if (voiceCommander != null)
            {
                voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
                voiceCommander.Stop();
                voiceCommander = null;
            }
            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }
            if (kinectSensor != null)
            {
                kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                kinectSensor.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                kinectSensor.Stop();
                kinectSensor = null;
            }
        }
示例#19
0
        private void Clean()
        {
            if (swipeGestureRecognizer != null)
            {
                swipeGestureRecognizer.OnGestureDetected -= OnGestureDetected;
            }

            if (audioManager != null)
            {
                audioManager.Dispose();
                audioManager = null;
            }

            
            ClosePostureDetector();

            if (voiceCommander != null)
            {
                voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
                voiceCommander.Dispose();
                voiceCommander = null;
            }

            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }

            if (kinectSensor != null)
            {
                kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                kinectSensor.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                kinectSensor.Stop();
                kinectSensor = null;
            }
        }
示例#20
0
        private void Clean()
        {
            if (_gestureSuite != null)
            {
                _gestureSuite.OnGestureDetected -= OnGestureDetected;
                _gestureSuite.OnGestureDetected -= UpdateGestureList;
            }

            if (audioManager != null)
            {
                audioManager.Dispose();
                audioManager = null;
            }

            
            ClosePostureDetector();

            if (voiceCommander != null)
            {
                voiceCommander.OrderDetected -= voiceCommander_OrderDetected;
                voiceCommander.Dispose();
                voiceCommander = null;
            }

            if (recorder != null)
            {
                recorder.Stop();
                recorder = null;
            }

            if (_kinectSensor != null)
            {
                _kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                _kinectSensor.SkeletonFrameReady -= kinectRuntime_SkeletonFrameReady;
                _kinectSensor.ColorFrameReady -= kinectRuntime_ColorFrameReady;
                _kinectSensor.Stop();
                _kinectSensor = null;
            }
        }
示例#21
0
        private void Initialize()
        {
            if (_kinectSensor == null)
                return;

            audioManager = new AudioStreamManager(_kinectSensor.AudioSource);
            audioBeamAngle.DataContext = audioManager;

            _kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
            _kinectSensor.ColorFrameReady += kinectRuntime_ColorFrameReady;

            _kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30);
            _kinectSensor.DepthFrameReady += kinectSensor_DepthFrameReady;

            _kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
                                                   {
                                                 Smoothing = 0.5f,
                                                 Correction = 0.5f,
                                                 Prediction = 0.5f,
                                                 JitterRadius = 0.05f,
                                                 MaxDeviationRadius = 0.04f
                                             });
            _kinectSensor.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;
            _gestureSuite = new GestureSuite();
            _gestureSuite.OnGestureDetected += OnGestureDetected;
            _gestureSuite.OnGestureDetected += UpdateGestureList;
            skeletonDisplayManager = new SkeletonDisplayManager(_kinectSensor, kinectCanvas);

            _kinectSensor.Start();

            LoadLetterTPostureDetector();

            nuiCamera = new BindableNUICamera(_kinectSensor);

            elevationSlider.DataContext = nuiCamera;

            voiceCommander = new VoiceCommander("record", "stop");
            voiceCommander.OrderDetected += voiceCommander_OrderDetected;

            StartVoiceCommander();

            kinectDisplay.DataContext = colorManager;
        }
        //Initialize method is called when a Kinect sensor is connected
        private void Initialize()
        {
            if (kinectSensor == null)
                return;
            //The beam angle is simply displayed by the AudioStreamManager:
            audioManager = new AudioStreamManager(kinectSensor.AudioSource);
            audioBeamAngle.DataContext = audioManager;

            kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
            kinectSensor.ColorFrameReady += kinectRuntime_ColorFrameReady;
            kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30);
            kinectSensor.DepthFrameReady += kinectSensor_DepthFrameReady;
            kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
            {
                Smoothing = 0.5f,
                Correction = 0.5f,
                Prediction = 0.5f,
                JitterRadius = 0.05f,
                MaxDeviationRadius = 0.04f
            });
            kinectSensor.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;
            swipeGestureRecognizer = new SwipeGestureDetector();
            swipeGestureRecognizer.OnGestureDetected += OnGestureDetected;
            skeletonDisplayManager = new SkeletonDisplayManager(kinectSensor, kinectCanvas);
            kinectSensor.Start();
            LoadGestureDetector();
            LoadLetterTPostureDetector();
            nuiCamera = new BindableNUICamera(kinectSensor);
            elevationSlider.DataContext = nuiCamera;
            voiceCommander = new VoiceCommander("record", "stop");
            voiceCommander.OrderDetected += voiceCommander_OrderDetected;
            StartVoiceCommander();
            kinectDisplay.DataContext = colorManager;

            dingPlayer = new SoundPlayer("ding.wav");  // Load sound
        }
        private void Initialize()
        {
            if (kinectSensor == null)
                return;

            audioManager = new AudioStreamManager(kinectSensor.AudioSource);
            audioBeamAngle.DataContext = audioManager;

            kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
            kinectSensor.ColorFrameReady += kinectRuntime_ColorFrameReady;

            kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution320x240Fps30);
            kinectSensor.DepthFrameReady += kinectSensor_DepthFrameReady;

            kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
                                                   {
                                                 Smoothing = 0.5f,
                                                 Correction = 0.5f,
                                                 Prediction = 0.5f,
                                                 JitterRadius = 0.05f,
                                                 MaxDeviationRadius = 0.04f
                                             });
            kinectSensor.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;

            swipeGestureRecognizer = new SwipeGestureDetector();
            swipeGestureRecognizer.OnGestureDetected += OnGestureDetected;

            skeletonDisplayManager = new SkeletonDisplayManager(kinectSensor, kinectCanvas);

            kinectSensor.Start();

            LoadCircleGestureDetector();
            LoadLetterTPostureDetector();

            nuiCamera = new BindableNUICamera(kinectSensor);

            elevationSlider.DataContext = nuiCamera;

            voiceCommander = new VoiceCommander("record", "stop");
            voiceCommander.OrderDetected += voiceCommander_OrderDetected;

            StartVoiceCommander();

            kinectDisplay.DataContext = colorManager;

            parallelCombinedGestureDetector = new ParallelCombinedGestureDetector();
            parallelCombinedGestureDetector.OnGestureDetected += OnGestureDetected;
            parallelCombinedGestureDetector.Add(swipeGestureRecognizer);
            parallelCombinedGestureDetector.Add(circleGestureRecognizer);

            MouseController.Current.DisableGestureClick = false;

            //            kinectSensor.SkeletonStream.TrackingMode = SkeletonTrackingMode.Seated;
        }