NaturalHistoryMuseum / pylibdmtx

Read Data Matrix barcodes from Python 2 and 3.
MIT License
147 stars 56 forks source link

How do I decode low quality image #77

Closed CurssedCoffin closed 2 years ago

CurssedCoffin commented 2 years ago

I have images in low quality like this. Could anyone help me to decode such images? mmexport1642751370588 This image is shot in dark environment but the main content is still good i think. I have tried to light it up and change the contrast but cannot decode it.

MathijsNL commented 2 years ago

I was able to scan it once, you know what the code should be for the image you posted?

I am getting this: CR114761X9E0T3XAC

Gimp has a tool for color curves. Screenshot below shows the curve I used to get the result (with app on my phone) image

If you find a way to do that in OpenCV you should be able to scan the codes.

CurssedCoffin commented 2 years ago

Thanks dude. Maybe color curves is a good solution to this problem. Thank you.

I was able to scan it once, you know what the code should be for the image you posted?

I am getting this: CR114761X9E0T3XAC

Gimp has a tool for color curves. Screenshot below shows the curve I used to get the result (with app on my phone) image

If you find a way to do that in OpenCV you should be able to scan the codes.