-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Datamatrix detection is sensitive to symbol position #189
Comments
Second, I saw your fix for #146 but unfortunately I cannot try it. I will try to update only the relevant DMDetector and see if it works on its own. |
I'll try to reproduce your findings that do in fact contradict my earlier claim. As for the Python wrapper: that should definitively work (and gets tested by the CI). If you have an issue, please open another issue. |
I checked your sample and can confirm your finding. It is indeed not sufficient for the symbol to be intersecting with any of the center lines, it is the vertical/left line of the 'L'-shaped finder pattern that needs to intersect with a center line. In your first counter example only the horizontal/bottom line does this. |
Ok thanks. That's useful information. I've opened a new issue #190 for the problem I'm having compiling the latest code. |
But if you can now compile the latest version, that should be easier and also more efficient than your suggested approach. Sooner or later, I'll have to decide on whether the currently implemented (but disabled because it is slow) approach is a cost that has to be payed... Interestingly, I recently came across the fact that the Google MLKit for android, that does all sorts of barcode detection, has indeed the same limitation for DataMatrix symbols. That tells me that even they don't have a magic AI wand to quickly detect DM symbols anywhere in the image. |
I did manage to compile the latest version after commenting out the tryharder=False line. Now I'm getting readout of the DM with all those cases. I recently came across this very high end barcode scanner and this has tons of hints for the algorithm (the process of defining the hints is called 'tuning'). Which codes to search, which orientation, where to search (different for each code type), maximum number of codes to detect, invert code and many others. This makes sense because there are a lot of assumptions when reading barcodes and these assumptions should both help the reading process, speed it up and be configurable in the form of 'hints'. |
Sort of fixed here: d6dc409 (needs c++-20). |
This is as fixed as it gets... -> closing. |
I have a simple and clear datamatrix that fails to be read by the library:
The image is 200x200 pixels:
When studying the problem it seems the library is very sensitive to the size of the image.
Simply cropping 15 pixels from the bottom of the image (so it's 200x185 pixels) allows the library to detect the DM:
Also extending the image from the top by 15 pixels allows detection (now it's 200x215 pixels)
In all cases the DM is located on the right side of the image.
What is the reason for this and is there a way to fix these problems without cropping images in many ways to successfully detect the DM?
The text was updated successfully, but these errors were encountered: