The engine that handles motion input from the Kinect
Exemplo n.º 1
0
        public static MotionEngine getInstance()
        {
            if (_instance == null)
            {
                _instance = new MotionEngine();
            }

            MotionEngine i = _instance;

            if (_instance.sensor.SkeletonStream == null)
            {
                _instance.InitializeMotionDetection();
            }

            return _instance;
        }
Exemplo n.º 2
0
        /// <summary>
        /// A callback method for when the page is loaded.
        /// Set's up the buttons and live image for the current page.
        /// Initializes the motion and speech controls as well.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            InitializeButtons();
            InitializeVideoImage();
            InitializeKinectHandIcons();

            motion = MotionEngine.getInstance();

            //InitializeMotionControl
            motion.registerHandMotion(OnButtonLocationChanged);
            //motion.registerVideoCapture(this.runtime_VideoFrameReady);

//#if (SPEECH)
//            speech = SpeechEngine.getInstance();

//            //InitializeSpeechRecognition();
//            speech.registerSpeechRecognized(this.SpeechRecognized);
//            speech.registerSpeechRejected(this.SpeechRejected);
//#endif
        }