glassechidna / zxing-cpp

ZXing C++ Library
Apache License 2.0
605 stars 436 forks source link

Datamatrix performance #98

Open MejlaB opened 2 years ago

MejlaB commented 2 years ago

Hello Everybody, I tried to use ZXing.Net to decode data matrix. When I test the application with QR and barcodes, then it works very well. When I tried to read datamatrix codes, then results were really poor. Datamatrix have to be in the middle of image and with almost no rotation, while QR can be anywhere and rotation has no significant impact to reading. Is it possible to use QR localization method also for datamatrix?

Thank you

MejlaB

axxel commented 2 years ago

If that is still relevant to you, I'd like to point you to 'the other' c++ port: https://github.com/zxing-cpp/zxing-cpp. I completely reimplemented the DataMatrix detection code there. It works for arbitrary rotations and if you compile it with a c++20 compiler it also works for arbitrary positions of the symbols. The limitation in this repo here are (to my knowledge) inherited from the original Java implementation. And no, the QR localization is not usable to locate DataMatrix symbols.

EDIT: fixed the link above (was pointing to the Java version... sigh)

TheUserOfGithub commented 2 years ago

Hi Axxel, thank you very much for information about this port. I implemented datamatrix square location and its extraction + rotation already using OpenCV functionalities. It works, but have some week points, so I will definitelly try the port.