static findGuardPattern(matrix, column, row, width, whiteFirst, pattern, counters) {
			Arrays.fillWithin(counters, 0, counters.length, 0);
			let patternStart = column;
			let pixelDrift = 0;
			// if there are black pixels left of the current pixel shift to the left, but only for MAX_PIXEL_DRIFT pixels
			while (matrix.get(patternStart, row) && patternStart > 0 && pixelDrift++ < Detector$3.MAX_PIXEL_DRIFT) {
				patternStart--;
			}
			let x = patternStart;
			let counterPosition = 0;
			let patternLength = pattern.length;
			for (let isWhite = whiteFirst; x < width; x++) {
				let pixel = matrix.get(x, row);
				if (pixel !== isWhite) {
					counters[counterPosition]++;
				}
				else {
					if (counterPosition === patternLength - 1) {
						if (Detector$3.patternMatchVariance(counters, pattern, Detector$3.MAX_INDIVIDUAL_VARIANCE) < Detector$3.MAX_AVG_VARIANCE) {
							return new Int32Array([patternStart, x]);
						}
						patternStart += counters[0] + counters[1];
						System.arraycopy(counters, 2, counters, 0, counterPosition - 1);
						counters[counterPosition - 1] = 0;
						counters[counterPosition] = 0;
						counterPosition--;
					}
					else {
						counterPosition++;
					}
					counters[counterPosition] = 1;
					isWhite = !isWhite;
				}
			}
			if (counterPosition === patternLength - 1 &&
				Detector$3.patternMatchVariance(counters, pattern, Detector$3.MAX_INDIVIDUAL_VARIANCE) < Detector$3.MAX_AVG_VARIANCE) {
				return new Int32Array([patternStart, x - 1]);
			}
			return null;
		}
@param matrix row of black/white values to search
@param column x position to start search
@param row y position to start search
@param width the number of pixels to search on this row
@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.