Beispiel #1
0
        public static Point GetWeightedAverage(ShiftsStorage shift_storage, List <ShiftStorageCache.PointInfo> corrections)
        {
            Point resulting_shift = new Point(0, 0);

            foreach (var correction in corrections)
            {
                resulting_shift.X += (int)(shift_storage.Corrections[correction.index].Shift.X * correction.weight);
                resulting_shift.Y += (int)(shift_storage.Corrections[correction.index].Shift.Y * correction.weight);
            }
            return(resulting_shift);
        }
 public CalibrationManagerV0(Options.CalibrationMode mode, bool for_testing)
 {
     calibration_mode = mode;
     shift_storage    = new ShiftsStorage(calibration_mode, for_testing);
 }
Beispiel #3
0
 public CalibrationManagerV1(Options.CalibrationMode mode, bool for_testing)
 {
     calibration_mode = mode;
     cache            = new ShiftStorageCache(mode);
     shift_storage    = new ShiftsStorage(calibration_mode, cache, for_testing);
 }