crossCheckVertical(startI /*int*/, centerJ /*int*/, maxCount /*int*/, originalStateCountTotal /*int*/) {
        const image = this.image;
        const maxI = image.getHeight();
        const stateCount = this.crossCheckStateCount;
        stateCount[0] = 0;
        stateCount[1] = 0;
        stateCount[2] = 0;
        // Start counting up from center
        let i = startI;
        while (i >= 0 && image.get(centerJ, i) && stateCount[1] <= maxCount) {
            stateCount[1]++;
            i--;
        }
        // If already too many modules in this state or ran off the edge:
        if (i < 0 || stateCount[1] > maxCount) {
            return NaN;
        }
        while (i >= 0 && !image.get(centerJ, i) && stateCount[0] <= maxCount) {
            stateCount[0]++;
            i--;
        }
        if (stateCount[0] > maxCount) {
            return NaN;
        }
        // Now also count down from center
        i = startI + 1;
        while (i < maxI && image.get(centerJ, i) && stateCount[1] <= maxCount) {
            stateCount[1]++;
            i++;
        }
        if (i === maxI || stateCount[1] > maxCount) {
            return NaN;
        }
        while (i < maxI && !image.get(centerJ, i) && stateCount[2] <= maxCount) {
            stateCount[2]++;
            i++;
        }
        if (stateCount[2] > maxCount) {
            return NaN;
        }
        const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];
        if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {
            return NaN;
        }
        return this.foundPatternCross(stateCount) ? AlignmentPatternFinder.centerFromEnd(stateCount, i) : NaN;
    }
/**
     * <p>After a horizontal scan finds a potential alignment pattern, this method
     * "cross-checks" by scanning down vertically through the center of the possible
     * alignment pattern to see if the same proportion is detected.</p>
     *
     * @param startI row where an alignment pattern was detected
     * @param centerJ center of the section that appears to cross an alignment pattern
     * @param maxCount maximum reasonable number of modules that should be
     * observed in any reading state, based on the results of the horizontal scan
     * @return vertical center of alignment pattern, or {@link Float#NaN} if not found
     */
After a horizontal scan finds a potential alignment pattern, this method
"cross-checks" by scanning down vertically through the center of the possible
alignment pattern to see if the same proportion is detected.

@param startI row where an alignment pattern was detected
@param centerJ center of the section that appears to cross an alignment pattern
@param maxCount maximum reasonable number of modules that should be
observed in any reading state, based on the results of the horizontal scan
@return vertical center of alignment pattern, or  Float#NaN if not found
After a horizontal scan finds a potential alignment pattern this method " cross - checks " by scanning down vertically through the center of the possible alignment pattern to see if the same proportion is detected . @param startI row where an alignment pattern was detected @param centerJ center of the section that appears to cross an alignment pattern @param maxCount maximum reasonable number of modules that should be observed in any reading state based on the results of the horizontal scan @return vertical center of alignment pattern or Float#NaN if not found
crossCheckVertical(startI , centerJ , maxCount , originalStateCountTotal ) {
        const image = this.image;
        const maxI = image.getHeight();
        const stateCount = this.crossCheckStateCount;
        stateCount[0] = 0;
        stateCount[1] = 0;
        stateCount[2] = 0;
        let i = startI;
        while (i >= 0 && image.get(centerJ, i) && stateCount[1] <= maxCount) {
            stateCount[1]++;
            i--;
        }
        if (i < 0 || stateCount[1] > maxCount) {
            return NaN;
        }
        while (i >= 0 && !image.get(centerJ, i) && stateCount[0] <= maxCount) {
            stateCount[0]++;
            i--;
        }
        if (stateCount[0] > maxCount) {
            return NaN;
        }
        i = startI + 1;
        while (i < maxI && image.get(centerJ, i) && stateCount[1] <= maxCount) {
            stateCount[1]++;
            i++;
        }
        if (i === maxI || stateCount[1] > maxCount) {
            return NaN;
        }
        while (i < maxI && !image.get(centerJ, i) && stateCount[2] <= maxCount) {
            stateCount[2]++;
            i++;
        }
        if (stateCount[2] > maxCount) {
            return NaN;
        }
        const stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];
        if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {
            return NaN;
        }
        return this.foundPatternCross(stateCount) ? AlignmentPatternFinder.centerFromEnd(stateCount, i) : NaN;
    }
crossCheckVertical ( startI , centerJ , maxCount , originalStateCountTotal ) { const image = this . image ; const maxI = image . getHeight ( ) ; const stateCount = this . crossCheckStateCount ; stateCount [ 0 ] = 0 ; stateCount [ 1 ] = 0 ; stateCount [ 2 ] = 0 ; let i = startI ; while ( i >= 0 && image . get ( centerJ , i ) && stateCount [ 1 ] <= maxCount ) { stateCount [ 1 ] ++ ; i -- ; } if ( i < 0 || stateCount [ 1 ] > maxCount ) { return NaN ; } while ( i >= 0 && ! image . get ( centerJ , i ) && stateCount [ 0 ] <= maxCount ) { stateCount [ 0 ] ++ ; i -- ; } if ( stateCount [ 0 ] > maxCount ) { return NaN ; } i = startI + 1 ; while ( i < maxI && image . get ( centerJ , i ) && stateCount [ 1 ] <= maxCount ) { stateCount [ 1 ] ++ ; i ++ ; } if ( i === maxI || stateCount [ 1 ] > maxCount ) { return NaN ; } while ( i < maxI && ! image . get ( centerJ , i ) && stateCount [ 2 ] <= maxCount ) { stateCount [ 2 ] ++ ; i ++ ; } if ( stateCount [ 2 ] > maxCount ) { return NaN ; } const stateCountTotal = stateCount [ 0 ] + stateCount [ 1 ] + stateCount [ 2 ] ; if ( 5 * Math . abs ( stateCountTotal - originalStateCountTotal ) >= 2 * originalStateCountTotal ) { return NaN ; } return this . foundPatternCross ( stateCount ) ? AlignmentPatternFinder . centerFromEnd ( stateCount , i ) : NaN ; }
<p>After a horizontal scan finds a potential alignment pattern, this method
 "cross-checks" by scanning down vertically through the center of the possible
 alignment pattern to see if the same proportion is detected.</p>
<p > After a horizontal scan finds a potential alignment pattern this method " cross - checks " by scanning down vertically through the center of the possible alignment pattern to see if the same proportion is detected . < / p >
/*int*/ /*int*/ /*int*/ /*int*/ // Start counting up from center // If already too many modules in this state or ran off the edge: // Now also count down from center