Esempio n. 1
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;
        }
Esempio n. 2
0
 /// <summary>
 /// Initialize kinect sensor stuff here. Called when a kinect is
 /// detected
 /// </summary>
 private void Initialize()
 {
     if (_kinectSensor == null)
         return;
     //initailize kinectSensor streams
     _kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
     _kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution640x480Fps30);
     _kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
     {
         Smoothing = 0.5f,
         Correction = 0.5f,
         Prediction = 0.5f,
         JitterRadius = 0.05f,
         MaxDeviationRadius = 0.04f
     });
     //add delegate for skeleton detection
     _kinectSensor.SkeletonFrameReady += kinectRuntime_SkeletonFrameReady;
     _gestureDetector = new GestureSuite();
     _gestureDetector.OnGestureDetected += ParseGesture;
     _gestureDetector.OnGestureDetected += UpdateGestureList;
     _kinectSensor.Start();
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes the testing suite
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     _gestureSuite = new GestureSuite();
     _gestureSuite.OnGestureDetected += ConfirmTest;
 }