Exemple #1
0
        public KinectTracker()
        {
            afterColorReady = skip;
            afterDepthReady = skip;

            settings = new KinectSettings();

            hands = new List <HandDetection>();

            // Check if there is any Kinect device connected
            if (KinectSensor.KinectSensors.Count > 0)
            {
                connected = true;
                sensor    = KinectSensor.KinectSensors.ElementAt(0);

                //sensor.DepthStream.Range = DepthRange.Near;

                sensor.DepthFrameReady += new EventHandler <DepthImageFrameReadyEventArgs>(depthFrameReady);
                sensor.ColorFrameReady += new EventHandler <ColorImageFrameReadyEventArgs>(colorFrameReady);
            }
            else // No device connected
            {
                connected = false;
            }
        }
Exemple #2
0
        public KinectTracker()
        {
            afterColorReady = skip;
            afterDepthReady = skip;

            settings = new KinectSettings();

            hands = new List<HandDetection>();

            // Check if there is any Kinect device connected
            if (KinectSensor.KinectSensors.Count > 0)
            {
                connected = true;
                sensor = KinectSensor.KinectSensors.ElementAt(0);

                //sensor.DepthStream.Range = DepthRange.Near;

                sensor.DepthFrameReady += new EventHandler<DepthImageFrameReadyEventArgs>(depthFrameReady);
                sensor.ColorFrameReady += new EventHandler<ColorImageFrameReadyEventArgs>(colorFrameReady);

            }
            else // No device connected
            {
                connected = false;
            }
        }