Esempio n. 1
0
        public Tracker(KinectSensor sn, MainWindow win, string fileName)
        {
            window     = win;
            outputFile = new CSVWrite(fileName);

            sensor = sn;
            try
            {
                sensor.Start();
            }

            catch (IOException)
            {
                sensor = null;
                MessageBox.Show("No Kinect sensor found. Please connect one and restart the application.", "*****ERROR*****");
                return;
            }

            sensor.SkeletonFrameReady += SensorSkeletonFrameReady;
            sensor.ColorFrameReady    += SensorColorFrameReady;
            sensor.SkeletonStream.Enable();
            sensor.ColorStream.Enable();
        }
Esempio n. 2
0
 public void RestartTracker(string newFileName)
 {
     outputFile = new CSVWrite(newFileName);
     sensor.SkeletonStream.Enable();
     sensor.ColorStream.Enable();
 }