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

Don't decode QR_CODE #556

Open
kkkaktusss opened this issue Mar 19, 2024 · 3 comments
Open

Don't decode QR_CODE #556

kkkaktusss opened this issue Mar 19, 2024 · 3 comments

Comments

@kkkaktusss
Copy link

Hi, i have a bit question. When I try to decode image, barcodereader can't find a QR_CODE format, but in "https://zxing.org" this type is recoginzed(attach a proof in picture).
My code return EAN_8, UPC_E, but not a QR_CODE.
var reader = new BarcodeReader() { AutoRotate = true}; reader.Options.TryHarder = true; reader.Options.PossibleFormats = new BarcodeFormat[] { BarcodeFormat.QR_CODE, BarcodeFormat.EAN_8, BarcodeFormat.UPC_E }; var result2 = reader.DecodeMultiple(imageMat);
2024-03-19_14-57-53

photo_2024-03-19_14-55-52

Can you help me?

@axxel
Copy link

axxel commented Apr 7, 2024

Can you post the QRCode image itself that fails to decode?

@kkkaktusss
Copy link
Author

i fixed that. Now, i push in zxing crop image and that worked. But anyway, why zxing recognize multiformat, if i push only qr_code type ?

@axxel
Copy link

axxel commented Apr 7, 2024

i fixed that. Now, i push in zxing crop image and that worked. But anyway, why zxing recognize multiformat, if i push only qr_code type ?

Well, with the reader.Options.PossibleFormats = new BarcodeFormat[] { BarcodeFormat.QR_CODE, BarcodeFormat.EAN_8, BarcodeFormat.UPC_E }; you explicitly look for EAN_8 as well. The reason you are getting a false positive EAN_8 is because of the quality of the EAN_8 detector. I assume the one used by ZXing.NET is still the same as the one implemented in the original Java ZXing library. I'm the maintainer of the zxing-cpp project and have reimplemented the EAN_8 detector/decoder (among others) which resulted in this specific case in a substantially reduced false positive rate. There is a .NET wrapper available as well: https://www.nuget.org/packages/ZXingCpp

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

2 participants