zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.
https://zxing-js.github.io/library/
Apache License 2.0
2.49k stars 547 forks source link

Does not decode ean-13 barcode from video if barcode is too small #474

Open muster-mark opened 3 years ago

muster-mark commented 3 years ago

Using BrowserMultiFormatReader.decodeFromVideoDevice, it does not decode an ean-13 barcode if the barcode does not take up quite a large area of the video.

This essentially means that, for example, scanning the barcode on the back of a book using my phone doesnt work, since the camera can't focus close enough to make the barcode big enough.

Is there a way around this?

jozef-rzadkosz commented 2 years ago

We need something like mask or scanning area, someone is focusing on this topic? This feature is really needed on mobile devices

zwerg44 commented 2 years ago

In my case, similar problem with decoding small ean-13 barcode - was caused by black borders around barcode. Also to resolve camera can't focus close enough I'm using camera zoom capability from MediaStreamTrack like this:

cenkerkumlucali commented 2 years ago

If you are doing it for an android, you will get what you want if you turn on the flash feature of your phone and zoom the camera (when the flash is turned on, the camera focuses better)

cenkerkumlucali commented 2 years ago

but ios doesn't allow to zoom or flash

muster-mark commented 2 years ago

@cenkerkumlucali I am not doing it for any particular operating system. It needs to work for all my users.

cenkerkumlucali commented 2 years ago

like i said ios doesn't allow it

github-actions[bot] commented 6 months ago

Stale issue message