@@ -143,7 +143,8 @@ |
||
143 | 143 | // This is a direct application of Chien's search |
144 | 144 | $numErrors = $errorLocator->getDegree(); |
145 | 145 | |
146 | - if($numErrors === 1){ // shortcut |
|
146 | + if($numErrors === 1){ |
|
147 | +// shortcut |
|
147 | 148 | return [$errorLocator->getCoefficient(1)]; |
148 | 149 | } |
149 | 150 |
@@ -152,7 +152,8 @@ |
||
152 | 152 | } |
153 | 153 | } |
154 | 154 | } |
155 | - catch(Exception $aioobe){//ArrayIndexOutOfBoundsException |
|
155 | + catch(Exception $aioobe){ |
|
156 | +//ArrayIndexOutOfBoundsException |
|
156 | 157 | // This feels wrong, but, sometimes if the finder patterns are misidentified, the resulting |
157 | 158 | // transform gets "twisted" such that it maps a straight line of points to a set of points |
158 | 159 | // whose endpoints are in bounds, but others are not. There is probably some mathematical |
@@ -88,7 +88,8 @@ |
||
88 | 88 | |
89 | 89 | if($this->bitMatrix->get($j, $i)){ |
90 | 90 | // Black pixel |
91 | - if($currentState === 1){ // Counting black pixels |
|
91 | + if($currentState === 1){ |
|
92 | +// Counting black pixels |
|
92 | 93 | $stateCount[$currentState]++; |
93 | 94 | } |
94 | 95 | // Counting white pixels |
@@ -59,7 +59,8 @@ |
||
59 | 59 | $estAlignmentY = (int)($topLeft->getY() + $correctionToTopLeft * ($bottomRightY - $topLeft->getY())); |
60 | 60 | |
61 | 61 | // Kind of arbitrary -- expand search radius before giving up |
62 | - for($i = 4; $i <= 16; $i <<= 1){//?????????? |
|
62 | + for($i = 4; $i <= 16; $i <<= 1){ |
|
63 | +//?????????? |
|
63 | 64 | $alignmentPattern = $this->findAlignmentInRegion($moduleSize, $estAlignmentX, $estAlignmentY, (float)$i); |
64 | 65 | |
65 | 66 | if($alignmentPattern !== null){ |