-
Notifications
You must be signed in to change notification settings - Fork 977
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
Image Not Detected #119
Comments
For example, this image |
I have found this too. It would appear that if it doesn't find a barcode it returns the callback without a On line:4398 of lib/quagga.js I added it to return a empty object if result was null
|
I feel like having onDetected called without a result is some kind of a bug. Anyone else? |
I agree with this not being a good experience, I also think it happened to me before. Definitely something we should try to track down and prevent. |
While getting testing working standalone with #303, I noticed that the callback is called pretty frequently without the expected code data. The question I guess I have, is are my expectations incorrect, or is that an incorrect response? decodeSingle() probably should callback with something. However, there seems to be an expectation throughout the code base that result codes will always be available to the callback .. |
I'll need to take a closer look at the internal structure to understand how we could improve this, but as far as expectations go, I think the current design could be improved. |
What I see in src/quagga.js in the area of line 534 is
.... and here-in lies the specific problem: decodeSingle's callback is not called similarly to onDetected -- it is called similarly to onProcessed. In src/quagga.js publishResult()
So, decodeSingle calls resultCallback as if it were onProcessed, but existing code (including at least the tests, and probably the samples, and the README, but i haven't looked yet) is expecting it to be called as if it were onDetected. I think this could cause quite a few questions. If nothing else, then there's definitely an action to be taken: clean up all uses of decodeSingle in samples/tests/documentation, to understand what to do in the case of no result.codeResult. |
Also, in my first comment on this thread, i had said onDetected, without reading the code file. The people reporting this problem have been using decodeSingle(). I'm pretty sure that in live mode, I've never seen onDetected called without a result, even if it isn't an accurate result. SO @cinnamolly and @sidonaldson if you're still out here, the root of the problem is expecting decodeSingle() to always return a codeResult -- if it wasn't able to decode a barcode, then you get no codeResult. |
Hi,
I'm finding that static images with clear barcodes (even barcodes generated from the Internet) are either resulting in "not detected" or the error:
if(result.codeResult) { ^ TypeError: Cannot read property 'codeResult' of undefined
Is there a certain type or resolution of image that needs to be uploaded? Why does this happen to my static images, but not the test images?
Any help would be greatly appreciated.
Thank you,
Molly
The text was updated successfully, but these errors were encountered: