コード例 #1
0
ファイル: KinectTracker.cs プロジェクト: Mrsterius/VBraille
        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;
            }
        }
コード例 #2
0
ファイル: KinectTracker.cs プロジェクト: manitgupta/VBraille
        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;
            }
        }