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
Bug in QRcode/Detector/ FinderPattern[] selectBestPatterns() #1144
Comments
No, it's checking whether the module size in the candidate is too different from the average. The check is correct. You can verify by trying your change; lots of tests fail. |
Yes, sorry, I was too fast with the conclusions. The point is that I have a big set of test images and on some of them this test is wrong. I work with the C++ version and modified the code the following way
Now it works MUCH better (for me ;) ) What I did was to exclude the possible centers with suspicious module size of 1 from the average and from the limit |
You can open a pull request with a similar change here. The question is whether it makes more images fail than succeed. |
I use about 1200 images in my regression test and for the time being I do not see images to fail becuase of the change. Unfortunately there are images where selectBestPattern still fails. |
Bug Reports
624 for (int i = 0; i < possibleCenters.size() && possibleCenters.size() > 3; i++) {
625 FinderPattern pattern = possibleCenters.get(i);
626 if (Math.abs(pattern.getEstimatedModuleSize() - average) > limit) {
627 possibleCenters.remove(i);
628 i--;
629 }
630 }
I am pretty sure that line 626 is wrong. As written it removes the GOOD patterns.
So it should be
if (Math.abs(pattern.getEstimatedModuleSize() - average) < limit) {
The text was updated successfully, but these errors were encountered: