- try {
- while (!foundStart) {
- delete [] startRange;
- startRange = NULL;
- startRange = findGuardPattern(row, nextStart, false, START_END_PATTERN,
- sizeof(START_END_PATTERN) / sizeof(int));
- int start = startRange[0];
- nextStart = startRange[1];
- // Make sure there is a quiet zone at least as big as the start pattern before the barcode.
- // If this check would run off the left edge of the image, do not accept this barcode,
- // as it is very likely to be a false positive.
- int quietStart = start - (nextStart - start);
- if (quietStart >= 0) {
- foundStart = row->isRange(quietStart, start, false);
- }
- }
- return startRange;
- } catch (ReaderException const& re) {