combineEstimate method

AlignmentPattern combineEstimate(
  1. double i,
  2. double j,
  3. double newModuleSize
)

Combines this object's current estimate of a finder pattern position and module size with a new estimate. It returns a new FinderPattern` containing an average of the two.

Implementation

AlignmentPattern combineEstimate(double i, double j, double newModuleSize) {
  final combinedX = (x + j) / 2.0;
  final combinedY = (y + i) / 2.0;
  final combinedModuleSize = (_estimatedModuleSize + newModuleSize) / 2.0;
  return AlignmentPattern(combinedX, combinedY, combinedModuleSize);
}