Difficulty in decoding few data matrix

Discussion related to "under the hood" OpenMV topics.
ondraga
Posts: 5
Joined: Thu Nov 15, 2018 11:15 pm

Difficulty in decoding few data matrix

Postby ondraga » Thu Nov 15, 2018 11:37 pm

These are my sample Data matrix that couldn't be decoded.

https://drive.google.com/open?id=1DSidJ ... sSFT5cASJY

https://drive.google.com/open?id=1anWgV ... 3hwgmqapFR

I changed Example program code

Code: Select all

sensor.set_pixformat(sensor.RGB565)
to

Code: Select all

sensor.set_pixformat(sensor.GRAYSCALE)
.

Even then, It's not decoding. Can anyone help me in this regard?
User avatar
kwagyeman
Posts: 2462
Joined: Sun May 24, 2015 2:10 pm

Re: Difficulty in decoding few data matrix

Postby kwagyeman » Fri Nov 16, 2018 12:44 am

Hi, we can't decode data matrixes like that. They aren't even close to the binary black and white ones that the library is meant for. If you want to decode a data matrixes like that you're going to have to preprocess the image to get a black and white image.

What I mean by this is to look at the data matrixes I show off in the video. The ones you are trying to process do not look similar.

That said, you can fix this however. The first step is to threshold the image. Please use the binary() method and the threshold editor to try to threshold the to black and white and see if this works. If it doesn't, then you're going to have to do something more complex.

Anyway, let me know how thresholding works and if you can get the thresholds to work well for you. What you are trying to do is legitimately hard and requires upfront image processing to extract a standard looking data matrixes code from the image. The data matrix library we use directly cannot work on a low contrast image like that directly.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests