$MIN_SKIP
$MIN_SKIP : int
<p>This class attempts to find finder patterns in a QR Code. Finder patterns are the square markers at three corners of a QR Code.</p>
This class is thread-safe but not reentrant. Each thread must allocate its own object.
Summary
find()
FurthestFromAverageComparator()
CenterComparator()
handlePossibleCenter()
getImage()
getPossibleCenters()
$MAX_MODULES
crossCheckVertical()
getCrossCheckStateCount()
crossCheckHorizontal()
crossCheckDiagonal()
haveMultiplyConfirmedCenters()
findRowSkip()
selectBestPatterns()
$average
$possibleCenters
$hasSkipped
$crossCheckStateCount
$image
$resultPointCallback
$MIN_SKIP : int
$MAX_MODULES : int
$CENTER_QUORUM : int
$average : ?float
$possibleCenters : array
$hasSkipped : bool
$crossCheckStateCount : mixed|int[]
handlePossibleCenter(\Zxing\Qrcode\Detector\reading $stateCount, \Zxing\Qrcode\Detector\row $i, \Zxing\Qrcode\Detector\end $j, true $pureBarcode) : true
<p>This is called when a horizontal scan finds a possible alignment pattern. It will cross check with a vertical scan, and if successful, will, ah, cross-cross-check with another horizontal scan. This is needed primarily to locate the real horizontal center of the pattern in cases of extreme skew.
And then we cross-cross-cross check with another diagonal scan.
If that succeeds the finder pattern location is added to a list that tracks the number of times each location has been nearly-matched as a finder pattern. Each additional find is more evidence that the location is in fact a finder pattern center
\Zxing\Qrcode\Detector\reading | $stateCount | state module counts from horizontal scan |
\Zxing\Qrcode\Detector\row | $i | where finder pattern may be found |
\Zxing\Qrcode\Detector\end | $j | of possible finder pattern in row |
true | $pureBarcode | if in "pure barcode" mode |
if a finder pattern candidate was found this time
crossCheckVertical( $startI, $centerJ, $maxCount, mixed $originalStateCountTotal) : float
<p>After a horizontal scan finds a potential finder pattern, this method "cross-checks" by scanning down vertically through the center of the possible finder pattern to see if the same proportion is detected.</p>
$startI | ; row where a finder pattern was detected |
|
$centerJ | ; center of the section that appears to cross a finder pattern |
|
$maxCount | ; maximum reasonable number of modules that should be observed in any reading state, based on the results of the horizontal scan |
|
mixed | $originalStateCountTotal |
vertical center of finder pattern, or {@link Float#NaN} if not found
crossCheckHorizontal(mixed $startJ, mixed $centerI, mixed $maxCount, mixed $originalStateCountTotal) : mixed
<p>Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, except it reads horizontally instead of vertically. This is used to cross-cross check a vertical cross check and locate the real center of the alignment pattern.</p>
mixed | $startJ | |
mixed | $centerI | |
mixed | $maxCount | |
mixed | $originalStateCountTotal |
crossCheckDiagonal( $startI, $centerJ, $maxCount, $originalStateCountTotal) : true
After a vertical and horizontal scan finds a potential finder pattern, this method "cross-cross-cross-checks" by scanning down diagonally through the center of the possible finder pattern to see if the same proportion is detected.
$startI | ; row where a finder pattern was detected |
|
$centerJ | ; center of the section that appears to cross a finder pattern |
|
$maxCount | ; maximum reasonable number of modules that should be observed in any reading state, based on the results of the horizontal scan |
|
$originalStateCountTotal | ; The original state count total. |
if proportions are withing expected limits
selectBestPatterns() : array
if 3 such finder patterns do not exist
the 3 best {@link FinderPattern}s from our list of candidates. The "best" are those that have been detected at least {@link #CENTER_QUORUM} times, and whose module size differs from the average among those patterns the least