ericblade / quagga2

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

Difficulties when scanning a flat barcode #502

Closed ITrun90 closed 1 year ago

ITrun90 commented 1 year ago

Hi Together, at the beginning a big thank you for the great work and the continuation of this project!

We use Quagga for different barcodes. It is a bit difficult to read the barcode when the barcode is flat type 2of5. With my settings it works halfway if I hold the camera further away from the barcode. But this seems to be not understandable for many users. Is there perhaps a better configuration for this type of barcode?

Here is a barcode as an example: image001

And here is my current configuration:

frequency: 20,
inputStream : {
    name : "Live",
    type : "LiveStream",
    target: "#barcode-video",
    constraints: {
        width: 640,
        height: 480
    },
    area: {
        top: "40%",
        right: "10%",
        left: "10%",
        bottom: "40%"
    },
    locate: true,
    locator: {
        halfSample: false,
        patchSize: 'medium'
    },
},
decoder : {
    readers : ["code_128_reader", "i2of5_reader", "ean_reader"]
}
github-actions[bot] commented 1 year ago

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

ericblade commented 1 year ago

Area and Locate should be mutually exclusive, only one should work at a time. I'm realizing that I've never actually tested that, but I would definitely try only using one or the other, but not both. You might even supply an option in your UI to switch between them, but using both at the same time is probably not a good idea.

Please report back if that helps or not.

Also, when posting a sample image, it would be helpful to also provide what type of barcode it is, I don't read them in my head :-) thanks!