calculateModuleSize method

double calculateModuleSize(
  1. ResultPoint topLeft,
  2. ResultPoint topRight,
  3. ResultPoint bottomLeft
)

Computes an average estimated module size based on estimated derived from the positions of the three finder patterns.

@param topLeft detected top-left finder pattern center @param topRight detected top-right finder pattern center @param bottomLeft detected bottom-left finder pattern center @return estimated module size

Implementation

//@protected
double calculateModuleSize(
  ResultPoint topLeft,
  ResultPoint topRight,
  ResultPoint bottomLeft,
) {
  // Take the average
  return (_calculateModuleSizeOneWay(topLeft, topRight) +
          _calculateModuleSizeOneWay(topLeft, bottomLeft)) /
      2.0;
}