Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to detect the barcode attached #531

Open
kotasudhakar opened this issue Jan 17, 2024 · 11 comments
Open

Not able to detect the barcode attached #531

kotasudhakar opened this issue Jan 17, 2024 · 11 comments

Comments

@kotasudhakar
Copy link

For some reason quagga2 not able to detect the barcode where as online barcode readers such as
https://online-barcode-reader.inliteresearch.com/
https://www.onlinebarcodereader.com/
https://products.aspose.app/barcode/recognize#
were able to detect this perfectly , i guess it is because of the background lines.
2024-01-16_13-56

Copy link

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

@ericblade
Copy link
Owner

Thanks for the example! What sort of barcode is it, EAN13? or something else?

@kotasudhakar
Copy link
Author

Thanks for the example! What sort of barcode is it, EAN13? or something else?

It is CODE_128 barcode

@ericblade
Copy link
Owner

Thanks for the info! When I have a chance, I'll add it to the tests, and see what happens

@kotasudhakar
Copy link
Author

By any chance did you get to work on this

@kotasudhakar
Copy link
Author

kotasudhakar commented Mar 16, 2024

And is there a way we can integrate yolo here to improve the detection rate significantly ?

@ericblade
Copy link
Owner

ericblade commented Mar 17, 2024

yolo?

sorry, this got set to the side, and I completely whiffed on it. My apologies.

BTW, using the default settings here: https://serratus.github.io/quaggaJS/examples/file_input.html

was able to detect this barcode exactly.

image

in fact, using every setting below 1280px resolution, which is broken in the original library, and above 320px, resulted in this working. Are you sure you had code 128 set?

I definitely like this one as a test/example, though, for sure. Shows that the lib does work in some really questionable cases.

@kotasudhakar
Copy link
Author

kotasudhakar commented Apr 19, 2024

barcode-afterCrop-1

This image containing (code 39 format) barcode gets detected on the https://serratus.github.io/quaggaJS/examples/file_input.html

But getting failed to detect on the quagga2, why?

Please note that if i crop the image containing the barcode only meaning precisely barcode area, this works with quagga2 also, but it should'nt be that way right. wondering why this is the issue with the quagga2 and not with quagga

Settings used -> {"inputStream":{"size":800},"locator":{"patchSize":"medium","halfSample":false},"numOfWorkers":1,"decoder":{"readers":[{"format":"code_39_reader","config":{}}]},"locate":true}, also tried to change the halfSampleto true, locate to false & true(with patchSize ->'small', 'medium'), did not work with quagga2 but working with quagga

@ericblade To make this explaination even simpler, i made a working example demo using quagga(quagga 0.12.1) demonstrating the same. please check this pen using the image above
https://codepen.io/kotasudhakar/pen/wvZQvPe

@ericblade
Copy link
Owner

hmm. I don't really have any idea on that at the moment, but it's possible that some of the code reorganization has created barely detectable differences.

I'm going to have to plug this into the test suite and give it a run. I appreciate how much you've detailed this, I just hope that I can find the time to check into it soon. If the people I work for detailed their bug reports as well as you have, I'd have a lot more time :-D

@kotasudhakar
Copy link
Author

btw, i was able to make this work, but not in a straight forward way. I have binary thresolded with [100,110,120,130,140,150,160,170] one at each time and try to detect the barcode. worked great, but i wish if this thing is also included in the quagga itself as some kind of options

@ericblade
Copy link
Owner

ericblade commented Apr 24, 2024

This sounds interesting -- I don't really understand what you're saying you did, though. Could you explain like I don't understand anything about image processing, because I really don't :-)

It does sound like a filter sort of feature that I've been tossing around in my head, something that should go between the camera input process and the barcode detection process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants