Exemple #1
0
        public void CalibrationStart()
        {
            //if (Settings.Instance.Processing.TrackingGlints)
            //{
            //    if (Settings.Instance.Processing.NumberOfGlints == 4)
            //        calibration = new CalibHomography();
            //    else
            //        calibration = new CalibPolynomial();
            //}
            //else
            //{
            //    calibration = new CalibPupil();
            //}

            calibration = new Calibration.Calibration();

            //server.SendMessage(GTCommands.Instance.Calibration, this.calibration.numTargets.ToString());
        }
Exemple #2
0
        private Tracker(GTCommands commands)
        {
            log.Info("Constructing Tracker...");
            this.commands       = commands;
            detectionManager    = new DetectionManager();
            calibration         = new Calibration.Calibration();
            recalibration       = new Recalibration();
            eyeMovement         = new Classifier();
            exponentialSmoother = new ExponentialSmoother(Settings.Instance.EyeMovement.SmoothNumberOfSamples, 0, (int)Math.Ceiling(Settings.Instance.EyeMovement.SmoothLevel / 5.0));
            visualization       = new Visualization();
            server                         = new UDPServer();
            gazeDataRaw                    = new GTGazeData();
            gazeDataSmoothed               = new GTGazeData();
            gazeDazaExtended               = new GTExtendedData();
            processingDone                 = true;
            timerCalibrationDelay          = new DispatcherTimer();
            timerCalibrationDelay.Interval = TimeSpan.FromMilliseconds(calibrationDelayMilliseconds);
            timerCalibrationDelay.Tick    += TimerCalibrationTick;
            logGaze                        = new Logger();
            logGaze.Server                 = server; // Used to send messages back to client (log start/stop etc.)
            log.Info("Looking up LoggingEnabled in FileSettings");
            logGaze.IsEnabled = Settings.Instance.FileSettings.LoggingEnabled;

            log.Info("Setting RecalibrationAvailableHandler");
            recalibration.RecalibrationAvailable += new Recalibration.RecalibrationAvailableHandler(recalibration_RecalibrationAvailable);
            //recalibration.OnRecalibrationAvailable +=new Recalibration.RecalibrationAvailable(recalibration_OnRecalibrationAvailable);
            Settings.Instance.Processing.PropertyChanged += ProcessingSettingsPropertyChanged;
            timerCalibrationDelay.Tick += TimerCalibrationTick;

            if (GTHardware.Camera.Instance.Device != null)
            {
                log.Info("Setting GTHardware device OnImage EventHandler");
                GTHardware.Camera.Instance.Device.OnImage += new EventHandler <GTHardware.Cameras.ImageEventArgs>(Device_OnImage);
            }

            log.Info("Completed constructing Tracker");
        }
Exemple #3
0
        private Tracker(GTCommands commands)
        {
            log.Info("Constructing Tracker...");
            this.commands = commands;
            detectionManager = new DetectionManager();
            calibration = new Calibration.Calibration();
            recalibration = new Recalibration();
            eyeMovement = new Classifier();
            exponentialSmoother = new ExponentialSmoother(Settings.Instance.EyeMovement.SmoothNumberOfSamples, 0, (int)Math.Ceiling(Settings.Instance.EyeMovement.SmoothLevel / 5.0));
            visualization = new Visualization();
            server = new UDPServer();
            gazeDataRaw = new GTGazeData();
            gazeDataSmoothed = new GTGazeData();
            gazeDazaExtended = new GTExtendedData();
            processingDone = true;
            timerCalibrationDelay = new DispatcherTimer();
            timerCalibrationDelay.Interval = TimeSpan.FromMilliseconds(calibrationDelayMilliseconds);
            timerCalibrationDelay.Tick += TimerCalibrationTick;
            logGaze = new Logger();
            logGaze.Server = server; // Used to send messages back to client (log start/stop etc.)
            log.Info( "Looking up LoggingEnabled in FileSettings" );
            logGaze.IsEnabled = Settings.Instance.FileSettings.LoggingEnabled;

            log.Info( "Setting RecalibrationAvailableHandler" );
            recalibration.RecalibrationAvailable += new Recalibration.RecalibrationAvailableHandler( recalibration_RecalibrationAvailable );
            //recalibration.OnRecalibrationAvailable +=new Recalibration.RecalibrationAvailable(recalibration_OnRecalibrationAvailable);
            Settings.Instance.Processing.PropertyChanged += ProcessingSettingsPropertyChanged;
            timerCalibrationDelay.Tick += TimerCalibrationTick;

            if ( GTHardware.Camera.Instance.Device != null )
            {
                log.Info( "Setting GTHardware device OnImage EventHandler" );
                GTHardware.Camera.Instance.Device.OnImage += new EventHandler<GTHardware.Cameras.ImageEventArgs>( Device_OnImage );
            }

            log.Info("Completed constructing Tracker");
        }
Exemple #4
0
        public void CalibrationStart()
        {
            //if (Settings.Instance.Processing.TrackingGlints)
            //{
            //    if (Settings.Instance.Processing.NumberOfGlints == 4)
            //        calibration = new CalibHomography();
            //    else
            //        calibration = new CalibPolynomial();
            //}
            //else
            //{
            //    calibration = new CalibPupil();
            //}

            calibration = new Calibration.Calibration();

            //server.SendMessage(GTCommands.Instance.Calibration, this.calibration.numTargets.ToString());
        }
Exemple #5
0
 public void StartRecalibration(Calibration calib)
 {
     CopyCorners(calib);
     recalibrating = true;
 }