ericblade / quagga2

An advanced barcode-scanner written in Javascript and TypeScript - Continuation from https://github.com/serratus/quaggajs
MIT License
748 stars 85 forks source link

Decoder Multiple Property #420

Closed alulsirclo closed 2 years ago

alulsirclo commented 2 years ago

The multiple property tells the decoder if it should continue decoding after finding a valid barcode. If multiple is set to true, the results will be returned as an array of result objects. Each object in the array will have a box, and may have a codeResult depending on the success of decoding the individual box.

I tried add multiple property to true, and passed multiple reader type too (ean, upc, and 128). I scan the upc barcode, but it always return single array with ean_13 type instead. Can quagga return all possibility type in that return? image

github-actions[bot] commented 2 years ago

Thank you for filing an issue! Please be patient. :-)

ericblade commented 2 years ago

Hi there! Multiple is used to locate and return the results of multiple barcodes within the input image.

UPC is a subset of ean_13, so if you want UPCs specifically you should use the upc reader, but if you want the wider range EAN then you should use that.

A single barcode object will not be decoded by multiple readers, the first one in the array that returns a positive result will be used.

Does that answer the question adequately? or have I misunderstood?

alulsirclo commented 2 years ago

Understood, thank you so much for your explanation