Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why ignore crossCheckDiagonal when NOT"PURE_BARCODE" #121

Open
RelicOfTesla opened this issue Jun 11, 2022 · 0 comments
Open

why ignore crossCheckDiagonal when NOT"PURE_BARCODE" #121

RelicOfTesla opened this issue Jun 11, 2022 · 0 comments

Comments

@RelicOfTesla
Copy link

RelicOfTesla commented Jun 11, 2022

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant