Closed pcumani closed 4 months ago
Awesome, good job. Will definitely test it out. :)
Seems to work as expected - getting the 4 corners is also more useful, as you can easily compute the boundingbox in your client-application, rather than in the library.
I left a comment about the namedtuple.
@quicklizard99 are you the owner of the repository? Can you check this PR out? Problem is described in https://github.com/NaturalHistoryMuseum/pylibdmtx/issues/51
I was testing this, and noticed that this commit would change the height value from a positive number to a negative number.
Previously, the height would be a positive value, but using this branch, the height values are negative. For example, the test datamatrix gives the following output using this branch:
Decoded(data=b'Stegosaurus', rect=Rect(left=189, top=92, width=96, height=-95)) Stegosaurus Decoded(data=b'Plesiosaurus', rect=Rect(left=333, top=89, width=96, height=-95)) Plesiosaurus
Should this be changed to match the previous outputs? I made a comment on line 192 for the change that would need to be made to do this if proper.
Just implemented the changes suggested by @jepperaskdk and @EukaDesigns
Can we get this merged ?
Hello! Please let me know if any other modification is needed.
Hi everyone! I haven't worked on this repository yet, but since this seems to be a major issue and it's been reviewed by 2 peers already, I'm willing to merge it in. Unfortunately I'm not able to release it to PyPI, so it won't be released on there until we can get hold of the package owner.
Hi
Thanks for creating pylibdmtx. I am using it to extract datamatrix from photos. Since the matrix in the photo can be rotated, I found myself in the situation described in issue #51. I have just implemented the code from @gauti1311 (https://github.com/NaturalHistoryMuseum/pylibdmtx/issues/51#issuecomment-582447839) and @jepperaskdk (https://github.com/NaturalHistoryMuseum/pylibdmtx/issues/51#issuecomment-1052125416) (a big thanks to both of them).
I have added a boolean parameter to choose between returning a rectangle defined as before (left, top, width, height) but encompassing the whole datamatrix: or the coordinates of the four vertices (P0, P1, P2, P3):