Exemple #1
0
        /// <summary>
        /// Set up a parser gor th images
        /// Parsing all the data
        /// </summary>
        /// <param name="provider">Provider of the Camera images</param>
        /// <param name="visualizer">The Output to write on</param>
        public QuadrilateralDataParser(IPictureProvider provider, IVisualizerControl visualizer)
        {
            // Initialize Calibration Tools
            _calibrator = new SimpleAForgeCalibrator(provider, visualizer);
            _calibrator.CalibrationCompleted += StartTracking; // begin pen tracking after calibration immediately

            _provider = provider;
        }
 public PredictiveAForgeCalibrator(IPictureProvider provider, IVisualizerControl visualizer)
 {
     _cc = provider;
     _vs = visualizer;
     //var thread = new Thread(() => _vs = new CalibratorWindow());
     //thread.SetApartmentState(ApartmentState.STA);
     //thread.Start();
     //thread.Join();
 }
 public SimpleAForgeCalibrator(IPictureProvider provider, IVisualizerControl visualizer)
 {
     _cc               = provider;
     _vs               = visualizer;
     MaxErrorCount     = 20;
     Rowcount          = 20;
     Columncount       = 15;
     MillisecondsDelay = 500;
 }
 public NoDiffAForgeCalibrator(IPictureProvider provider, IVisualizerControl vc)
 {
     _cc       = provider;
     _vs       = vc;
     this.Grid = new Grid(0, 0);
     //var thread = new Thread(() => _vs = new CalibratorWindow());
     //thread.SetApartmentState(ApartmentState.STA);
     //thread.Start();
     //thread.Join();
 }
        //private Task calibTask;

        /// <summary>
        /// A calibrator is needed to get the calibration grid
        /// </summary>
        /// <param name="cc"></param>
        public PrimitiveCalibrator(IPictureProvider prov, IVisualizerControl vc)
        {
            Grid = new Grid(0, 0);
            _vs  = vc;
            //var thread = new Thread(() => _vs = new CalibratorWindow());
            //thread.SetApartmentState(ApartmentState.STA);
            //thread.Start();
            //thread.Join();
            Calibrate();
            CalibrateColors();
        }
        /// <summary>
        /// Set up a parser gor th images
        /// Parsing all the data
        /// </summary>
        /// <param name="provider">Provider of the Camera images</param>
        /// <param name="visualizer">The Output to write on</param>
        public DataParser(IPictureProvider provider, IVisualizerControl visualizer)
        {
            // Initialize Calibration Tools
            _calibrator = new SimpleAForgeCalibrator(provider, visualizer);
            _calibrator.CalibrationCompleted += StartTracking; // begin pen tracking after calibration immediately

            // Initialize Pen Tracking Tools
            _penTracker             = new AForgePenTracker(new WhiteLedStrategy(), provider);
            _penTracker.PenFound   += PenFound;
            _penTracker.NoPenFound += NoPenFound;

            _mapperType = typeof(BarycentricIntegralPointMapper);
        }