Creates a finder that will look in a portion of the whole image.
image to search
left column from which to start searching
top row from which to start searching
width of region to search
height of region to search
estimated module size so far
height of region to search
image to search
estimated module size so far
left column from which to start searching
top row from which to start searching
width of region to search
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.
row where an alignment pattern was detected
center of the section that appears to cross an alignment pattern
maximum reasonable number of modules that should be observed in any reading state, based on the results of the horizontal scan
vertical center of alignment pattern, or {@link Float#NaN} if not found
This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since it's pretty performance-critical and so is written to be fast foremost.
AlignmentPattern if found
count of black/white/black pixels just read
true iff the proportions of the counts is close enough to the 1/1/1 ratios used by alignment patterns to be considered a match
This is called when a horizontal scan finds a possible alignment pattern. It will cross check with a vertical scan, and if successful, will see if this pattern had been found on a previous horizontal scan. If so, we consider it confirmed and conclude we have found the alignment pattern.
reading state module counts from horizontal scan
row where alignment pattern may be found
end of possible alignment pattern in row
AlignmentPattern if we have found the same pattern twice, or null if not
Given a count of black/white/black pixels just seen and an end position, figures the location of the center of this black/white/black run.
Generated using TypeDoc
This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder patterns but are smaller and appear at regular intervals throughout the image.
At the moment this only looks for the bottom-right alignment pattern.
This is mostly a simplified copy of FinderPatternFinder. It is copied, pasted and stripped down here for maximum performance but does unfortunately duplicate some code.
This class is thread-safe but not reentrant. Each thread must allocate its own object.
Sean Owen