コード例 #1
0
        /*
         * Get everything initialized
         */
        public void Initialize()
        {
            if (kinectSensor == null)
            {
                return;
            }

            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;

            skeletonDisplayManager = new SkeletonDisplayManager(kinectSensor, kinectCanvas);
            //Add keywords that you wan to detect
            //v_commander = new VoiceCommander("record", "stop", "fly away", "flapping", "start", "finish", "write");

            kinectSensor.Start();
            //kinectDisplay.DataContext = colorManager;

            //v_commander.OrderDetected += voiceCommander_OrderDetected;
            //StartVoiceCommander();

            Dictionary <string, GesturePackage> gestureDic = fileManager.loadGesture();

            GesturePackage[] values = new GesturePackage[gestureDic.Values.Count];
            gestureDic.Values.CopyTo(values, 0);

            foreach (GesturePackage package in values)
            {
                gesture1_left.Add(package.getLeftCoordinates()[0]);
                gesture1_right.Add(package.getRightCoordinates()[0]);
            }
        }
コード例 #2
0
        /*
         * Get everything initialized
         */
        public void Initialize()
        {
            if (kinectSensor == null)
            {
                return;
            }

            //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;

            //Add keywords that you wan to detect
            //v_commander = new VoiceCommander("record", "stop", "fly away", "flapping", "start", "finish", "write");

            kinectSensor.Start();
            //kinectDisplay.DataContext = colorManager;

            //v_commander.OrderDetected += voiceCommander_OrderDetected;
            //StartVoiceCommander();

            fileManager = new GestureIO();
            fileManager.loadGesture();
        }
コード例 #3
0
        /*
         * Get everything initialized
         */
        public void Initialize() {
            if (kinectSensor == null)
                return;

            //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;

            //Add keywords that you wan to detect
            //v_commander = new VoiceCommander("record", "stop", "fly away", "flapping", "start", "finish", "write");

            kinectSensor.Start();
            //kinectDisplay.DataContext = colorManager;

            //v_commander.OrderDetected += voiceCommander_OrderDetected;
            //StartVoiceCommander();

            fileManager = new GestureIO();
            fileManager.loadGesture();
        }