serratus / quaggaJS

An advanced barcode-scanner written in JavaScript
https://serratus.github.io/quaggaJS/
MIT License
5.03k stars 978 forks source link

Can I scan ean-5 only ? #457

Open michaeljholmes opened 3 years ago

michaeljholmes commented 3 years ago

Hi there, Does anyone know is there is way to scan just the ean-5 barcode? Cheers!

ericblade commented 3 years ago

From README

image

michaeljholmes commented 3 years ago

Thanks for the reply @ericblade , but perhaps I wasn't clear. I have tried what is stated in the docs, but I only want to read the second half of the bar code as that is all I have. When testing it only worked when reading the ean-13 part along with the ean-5 part. Can you confirm that the config should work just for the ean-5 section of the barcode? Many thanks

michaeljholmes commented 3 years ago

ean 5 Here is an example - I want to just read this?

ericblade commented 3 years ago

Apologies if I closed prematurely, before fully understanding. I do not actually know if that is supported or intended to be supported. None of the tests supplied seem to test that, although the code looks to me like it might work? I don't even see any other readers that support decoding the 5 part at all, on a quick google search for "online barcode scanners". Dynamsoft's is usually the one i plug things into when I'm trying to compare Quagga's results to other things, and it doesn't even comprehend the additional 5 digits with a EAN, let alone the 5 digits alone.

Unfortunately, I don't have an answer for that, beyond "maybe". I'm guessing that without the presence of the main part of the EAN, it might not be able to decode the rest of it.

michaeljholmes commented 3 years ago

@ericblade thats ok, I wasn't very clear! I spoke with Dynamsoft too and they don't do it either. I'll keep checking and see what I come up with - thank you.