mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
5.09k stars 980 forks source link

QRCode Decoding Performance Improvements #651

Open Sergio- opened 1 year ago

Sergio- commented 1 year ago

Hi Folks. Good day. I hope you're doing good. I'm looking for options to improve the qr-code decoding performance on situations where the image is, let's say, not ideal.

I've been experimenting with different libraries and different implementations and I've documented the results on the attached file. It's just a small set of barcodes with increasing level of degradation, so we have a base comparison. QRCode_Decoding_Comparison.pdf

From the libraries I've tested, the Dynamsoft one seems to have the best decoding performance (and I'm wondering how they do it). It is, however, not a option for most of use cases due to the very high price and the licensing restrictions.

For the ZXing different implementation, the BinaryEye Native Android App is the 2nd best performance.

For the Javascript options, I was not able to find any comparable option. So a couple of questions come to mind and I appreciate if the folks can can collaborate/contribute with ideas and suggestions.

a) Using the same browser, same phone (hence the same camera), why the Dynamsoft library can decode a much higher number of qrcodes that the other Javascript implementations?

b) Is it possible to improve the current JS implementations in any way, by, for example, per-processing the image with a blur/sharpen, brightness/contrast or color threshold filters before sending it to the decoding algorithm?

c) Is there any other method you can think of to improve the decoding of degraded, high density qr codes?

Any suggestion is appreciated.

Thank you.

Thaysdld commented 1 year ago

Nossa você está com as mesmas questões que eu, espero que alguém responda, também já usei o Dynamsoft o custo não é acessível mas leitura deles é fantástica.