static findGuardPattern(row, rowOffset, whiteFirst, pattern, counters) {
			let width = row.getSize();
			rowOffset = whiteFirst ? row.getNextUnset(rowOffset) : row.getNextSet(rowOffset);
			let counterPosition = 0;
			let patternStart = rowOffset;
			let patternLength = pattern.length;
			let isWhite = whiteFirst;
			for (let x = rowOffset; x < width; x++) {
				if (row.get(x) !== isWhite) {
					counters[counterPosition]++;
				}
				else {
					if (counterPosition === patternLength - 1) {
						if (OneDReader.patternMatchVariance(counters, pattern, AbstractUPCEANReader.MAX_INDIVIDUAL_VARIANCE) < AbstractUPCEANReader.MAX_AVG_VARIANCE) {
							return Int32Array.from([patternStart, x]);
						}
						patternStart += counters[0] + counters[1];
						let slice = counters.slice(2, counters.length - 1);
						for (let i = 0; i < counterPosition - 1; i++) {
							counters[i] = slice[i];
						}
						counters[counterPosition - 1] = 0;
						counters[counterPosition] = 0;
						counterPosition--;
					}
					else {
						counterPosition++;
					}
					counters[counterPosition] = 1;
					isWhite = !isWhite;
				}
			}
			throw new NotFoundException();
		}
@param row row of black/white values to search
@param rowOffset position to start search
@param whiteFirst if true, indicates that the pattern specifies white/black/white/...
pixel counts, otherwise, it is interpreted as black/white/black/...
@param pattern pattern of counts of number of black and white pixels that are being
searched for as a pattern
@param counters array of counters, as long as pattern, to re-use
@return start/end horizontal offset of guard pattern, as an array of two ints
@throws NotFoundException if pattern is not found