Let's assume i have a numpy array like
[[1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0]
[1 0 1 1 0 1 0 1 0 1 0 0 0 0 1 1]
[1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0]
[1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1]
[1 0 0 1 0 0 0 1 1 1 0 1 0 0 0 0]
[1 0 1 1 0 1 0 1 0 1 1 0 0 0 1 1]
[1 0 0 1 1 0 0 1 1 0 1 0 1 0 0 0]
[1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 1]
[1 1 1 1 0 0 0 1 1 0 0 1 0 1 1 0]
[1 1 0 1 0 1 1 1 1 1 1 0 1 0 0 1]
[1 0 1 1 0 0 1 1 1 0 1 1 0 1 0 0]
[1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 1]
[1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0]
[1 0 1 1 0 0 0 0 1 1 0 1 1 1 0 1]
[1 0 1 1 0 1 0 0 0 1 1 1 1 0 1 0]
[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]]
Which is basically an already deciphered data matrix code from custom code...how can I easily convert this to text?
I tried using the pylibdmtx library but this failed:
from pylibdmtx.pylibdmtx import decode, encode
decode((myarray.tobytes(), 16, 16))
I can obviously use matplotlib save it using imshow to file. Read it in as an image and use the decode function on the image, but since i already have the 16x16 decoded part i want to be efficient. Is there an easy python implementation available for this?