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.12k stars 984 forks source link

Scan non-horizontal barcodes #297

Open Leonick opened 3 years ago

Leonick commented 3 years ago

It seems at the moment barcodes like EAN are only scanned if somewhat horizontal? Would like them to be scanned if at an angle as well such as being vertical or diagonal to the camera.

mebjas commented 3 years ago

@Leonick can you share some sample screenshots I can try?

Leonick commented 3 years ago

I can demonstrate using you supported formats list.

First image, 90 degree rotation, no recognition image

Second images, 45 degree rotation, no recognition image

Third image, here it found the code. image

usamaibrahim93 commented 3 years ago

Hi,

Is there any update on this. We are facing a similar issue where barcodes are not being read if the device is rotated or kept at an angle.

Is there a setting for this that I may be missing?

Thank you in advance!

mebjas commented 3 years ago

On Pixel 4, qrcode.minhazav.dev and scanapp.org seems to be able to scan horizontal codes. What platform, device are you using for testing?

usamaibrahim93 commented 3 years ago

I am checking on Samsung A12 and its not working even when using on scanapp.org. :/ QR codes work fine in any orientation but barcodes work only in portrait mode.

mebjas commented 2 years ago

I tried on another low end Android device. It looks like it can read the first code and last code without any movement while the 2nd code needed myself to rotate the device (which should be an OK workaround) - Although on iphone/safari I needed to rotate the device for first one as well.

I'll be exploring more on what the library can do to help with this issue at https://github.com/mebjas/html5-qrcode/issues/372.