library icon indicating copy to clipboard operation
library copied to clipboard

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

Open muster-mark opened this issue 3 years ago • 7 comments

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?

muster-mark avatar Sep 22 '21 13:09 muster-mark

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

jozef-rzadkosz avatar Nov 10 '21 08:11 jozef-rzadkosz

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:

  • track.getCapabilities() - to check camera/browser supports zoom
  • track.applyConstraints({ advanced: [{zoom: nextZoom}] }) - to zoom

zwerg44 avatar Nov 23 '21 12:11 zwerg44

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 avatar Feb 01 '22 13:02 cenkerkumlucali

but ios doesn't allow to zoom or flash

cenkerkumlucali avatar Feb 01 '22 13:02 cenkerkumlucali

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

muster-mark avatar Feb 01 '22 21:02 muster-mark

like i said ios doesn't allow it

cenkerkumlucali avatar Feb 02 '22 05:02 cenkerkumlucali

Stale issue message

github-actions[bot] avatar Apr 29 '24 12:04 github-actions[bot]