// image, and then account for the center being 3 modules in size. This gives the smallest\r
// number of pixels the center could be, so skip this often. When trying harder, look for all\r
// QR versions regardless of how dense they are.\r
- int iSkip = (int) (maxI / (MAX_MODULES * 4.0f) * 3);\r
+ int iSkip = (3 * maxI) / (4 * MAX_MODULES);\r
if (iSkip < MIN_SKIP || tryHarder) {\r
iSkip = MIN_SKIP;\r
}\r
// expensive and didn't improve performance.\r
iSkip = 2;\r
if (hasSkipped) {\r
- done = haveMulitplyConfirmedCenters();\r
+ done = haveMultiplyConfirmedCenters();\r
} else {\r
int rowSkip = findRowSkip();\r
if (rowSkip > stateCount[2]) {\r
iSkip = stateCount[0];\r
if (hasSkipped) {\r
// Found a third one\r
- done = haveMulitplyConfirmedCenters();\r
+ done = haveMultiplyConfirmedCenters();\r
}\r
}\r
}\r
* at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the\r
* candidates is "pretty similar"\r
*/\r
- private boolean haveMulitplyConfirmedCenters() {\r
+ private boolean haveMultiplyConfirmedCenters() {\r
int confirmedCount = 0;\r
float totalModuleSize = 0.0f;\r
int max = possibleCenters.size();\r
// and that we need to keep looking. We detect this by asking if the estimated module sizes\r
// vary too much. We arbitrarily say that when the total deviation from average exceeds\r
// 15% of the total module size estimates, it's too much.\r
- float average = totalModuleSize / max;\r
+ float average = totalModuleSize / (float) max;\r
float totalDeviation = 0.0f;\r
for (int i = 0; i < max; i++) {\r
FinderPattern pattern = (FinderPattern) possibleCenters.elementAt(i);\r