html5-qrcode icon indicating copy to clipboard operation
html5-qrcode copied to clipboard

Aztec code from the Polish vehicle registration certificates is not recognized

Open Misiu opened this issue 3 years ago • 7 comments

Describe the bug The library supports Aztec codes and it works well with simple (small) codes, but it isn't able to read Aztec code from the Polish vehicle registration certificates.

To Reproduce Steps to reproduce the behavior:

  1. Display the code on your PC or print it
  2. Open https://scanapp.org/#reader or your library sample page
  3. Try to read the code

Expected behavior The library should support larger Aztec codes (including the one I've provided)

Screenshots Sample code image

what should the library read: XXC1|BAM5210661|1465178|PREZYDENT M. ST. WARSZAWY|DZIELNICA WŁOCHY|AL. KRAKOWSKA 257|02-133 WARSZAWA|WW 444XP|MERCEDES-BENZ||||S 350 D 4MATIC|WDD2221331A229124|2016-12-19|---|POLMAN S.A.||||012110950|02-197|WARSZAWA|WARSZAWA|NA SKRAJU|68||POLMAN S.A.||||012110950|02-197|WARSZAWA|WARSZAWA|NA SKRAJU|68||2750|2750|4935|2045|---|---|2|2100|750|---|2987,00|190,00|D |2015-10-07|5|---|SAMOCHÓD OSOBOWY|---|2015|---|14,31|AAC3745751|03470119000000|03|01|000|1111NNNNNNNN|009007001|

Smartphone (please complete the following information):

  • Device:Huaweii P20
  • OS: Android 10
  • Browser: Chrome
  • Version: 96.0.4664.45

Additional context I've tested the code with two apps: https://play.google.com/store/apps/details?id=pl.zaufanatrzeciastrona.zxing.client.android&hl=pl https://play.google.com/store/apps/details?id=com.apreel.aztecscanner&hl=pl

both read the code perfect

Misiu avatar Feb 09 '22 11:02 Misiu

Be aware that the image to be decoded seems always to be taken from the reader div. So even if you have a high-resolution camera, if the div is too small the encoder may not be able to correctly read the code.

So I recommend you create your own page with a larger reader div and try again. Let us know if that helps.

bluepuma77 avatar Feb 09 '22 14:02 bluepuma77

@bluepuma77 sure thing. Will try that and report back

Misiu avatar Feb 09 '22 14:02 Misiu

@bluepuma77 sadly this isn't working. I have a codesandbox that's trying to read my codes - https://codesandbox.io/s/scanner-forked-r09v9?file=/src/App.js I've removed the qrbox property but that didn't help. As mentioned before the apps I linked work really well.

Misiu avatar Feb 09 '22 14:02 Misiu

@Misiu your approach actually worked with my (other) big QR codes - increasing qrbox to 330 or leaving it out

Looks like your problem is different though -> I cannot read you example even with that https://zxing-js.github.io/library/examples/aztec-camera/ example, maybe the problem is deeper in the zxing-js?

StenGruener avatar Feb 10 '22 11:02 StenGruener

@StenGruener I can confirm that the demo you linked doesn't work with the code I posted or with actual document scanning. the library is using Barcode Detection API (https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API), maybe it will work. not sure how to test that. I've created a react-native app that is using https://www.npmjs.com/package/expo-barcode-scanner and it reads the code just fine. But I'd like to create an open-source website where everyone from Poland will be able to read the data from their vehicle registration certificates.

Misiu avatar Feb 10 '22 11:02 Misiu

@mebjas I've edited my previous message and linked the correct package that I've used in my prototype app, it's https://www.npmjs.com/package/expo-barcode-scanner

Misiu avatar Feb 10 '22 20:02 Misiu

@mebjas any updates? Any way I could help?

Misiu avatar Mar 31 '22 07:03 Misiu

@mebjas ping

Misiu avatar Nov 08 '22 11:11 Misiu

@mebjas any updates?

pcholewa avatar Mar 14 '23 13:03 pcholewa

Ping

Misiu avatar Aug 21 '23 12:08 Misiu