php-qrcode-detector-decoder
php-qrcode-detector-decoder copied to clipboard
why ignore crossCheckDiagonal when NOT"PURE_BARCODE"
Dose not work some picture.... Debug and found the diffrent run logic at this code
https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/qrcode/detector/FinderPatternFinder.java line 516
...
public class FinderPatternFinder {
....
protected final boolean handlePossibleCenter(
....
if (!Float.isNaN(centerJ) && crossCheckDiagonal((int) centerI, (int) centerJ)) {
https://github.com/khanamiryan/php-qrcode-detector-decoder/blob/master/lib/Qrcode/Detector/FinderPatternFinder.php line 231
class FinderPatternFinder
{
....
final public function find($hints)
{
....
$pureBarcode = $hints != null && $hints['PURE_BARCODE'];
....
if (!is_nan($centerJ) &&
(!$pureBarcode || $this->crossCheckDiagonal((int)($centerI), (int)($centerJ), $stateCount[2], $stateCountTotal))
) {
Was skip some crossCheckDiagonal logic...and dose not work at some picture..