Free Support Forum - aspose.com

DataMatrxi recognition

Hello,

I’m evaluating the Java BarCode library to recognize DataMatrix barcodes. To that end I requested and got an evaluation license.

My first try simply produces wrong results. The code below mimics that of the samples and the attached .png image is present in the right folder.


package com.aspose.barcode.samples;

import com.aspose.barcode.License;
import com.aspose.barcoderecognition.BarCodeReadType;
import com.aspose.barcoderecognition.BarCodeReader;

public class LWDataMatrixTest {

public static void main(String[] args) throws Exception {
License lic = new License();
lic.setLicense(com.aspose.barcode.samples.Constants.LICENSE_FULL_PATH);
BarCodeReader reader =
new BarCodeReader(com.aspose.barcode.samples.Constants.GENERATED_IMAGES_PATH + “test-0.png”,
BarCodeReadType.getDataMatrix());
while (reader.read()) {
System.out.println(reader.getCodeText());
}
}
}

There are 11 codes on the low quality image. I’m not expecting all 11 to be recognized. However, I get 6 strings not reproduced here for they are incredibly long, about 680 characters, no one of which is correct!

Some suggestion?

Thanks
Mario Rossi

Hi Mario,


We are sorry for your inconvenience.

Thanks to your sample, I can reproduce the problem of incorrect code text by using the latest version of Aspose.BarCode for Java library. For investigation and correction purposes, I have raised a ticket (BARCODJAVA-33156) and attached the same to your request for future reference. As soon as a fix is available, you will be notified automatically via this thread.

Thank you for considering Aspose.

Regards,

Hi Mario,


We are currently analysing your reported issue, and we need some more information from your side to isolate the problem cause. Please note, we need to understand what and how the data was encoded to see where the problem lies in our recognition module.

  • Could you please state, what compaction mode (Binary/Text) have you used to generate your provided DataMatrix barcode symbols?
  • Please provide the code text for all the symbols in your provided sample.

Thank you for your understanding and cooperation.

Hello,

first, it’s Mario not Moris (copy and paste might help)

The 11 barcodes were encoded with the following strings, including the trailing semicolon.

I was using a library which automatically decides the best encoding depending on the contents of the strings, so I don’t know which mode the library chose, if ASCII, BASE256 or whatever.

0.6 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
0.8 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.2 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.4 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.6 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.8 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
2.4 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
2.8 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
3.2 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
3.6 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;

Hope this helps
Mario Rossi

mrossi:


first, it's Mario not Moris (copy and paste might help)


Hi Mario,

I am very sorry for this inconvenience, and I have edited my replies to correctly spell your name. Please accept my apologies.

Regarding the issue, we are still unable to get the correct code text from your provided sample. We believe that your DataMatrix encoder is not encoding the data properly. So in order to pin point the problem cause, we first need to understand that functioning of the DataMatrix encoder that generated such barcode symbols. Therefore, we requested you to provide us the name/link of the tool/library that you have used.

Below are the results that we are getting from your sample; barcodes starting from 1.4,
1.4 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@8@80@8@@@8@18@@@;PG=1;
1.6 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@8@80@8@@@8@18@@@;PG=1;
1.8 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@8@80@8@@@8@18@@@;PG=1;
2.4 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@8@80@8@@@8@18@@@;PG=1;
2.8 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@8@80@8@@@8@18@@@;PG=1;
3.2 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@8@80@8@@@8@18@@@;PG=1;
3.6 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@8@80@8@@@8@18@@@;PG=1;

Please note that we have verified your sample with some other tools as well, just to counter-check the results. Unfortunately, in all case the results are the same as given above.

Thank you for your cooperation and understanding.

Hello,

in the meantime I tried 2 other recognition products, too.

The results agree with yours but there are 2 more
1 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.2 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;
1.4 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;
1.6 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;
1.8 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;
2.4 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;
2.8 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;
3.2 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;
3.6 // CN=ATS-095-555;DOC=70b4c229-@6@6-11@@-8@80-@8@@@8@18@@@;PG=1;

So, there is certainly a problem with the DataMatrix generator we are using (except for the first code), but at least your results and that of other recognition software match.

However, this does not explain why my experiment with your library produces strings that are 680 characters long! Why do I not obtain the results you found? Are you using a more recent version of the library than 4.5.0?

Unfortunately, today I’ve no time for further experiments, I will retry tomorrow, so please stay tuned.

Thanks
Mario Rossi

Hi Mario,


Thank you for the confirmation.

Please note that we are currently testing your sample with the under development version of Aspose.BarCode for .NET. Once the issue is fixed in .NET version, the fix will automatically propagate to Java version of the product in its next release.

Regards,

Hello Babar,

as a test suite, find attached 3 .png of different qualities.

They all encode the following strings in different sizes, once as BASE256 and once as ASCII, as indicated in the captions, for a total of 20 barcodes.

3.6 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
3.2 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
2.8 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
2.4 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.8 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.6 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.4 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1.2 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
1 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;
0.8 // CN=ATS-095-555;DOC=70b4c229-e6c6-11df-8e80-c8bcc8d18abf;PG=1;

Please check with your development version of the recognizer and report your results.

Thanks
Mario Rossi

Hi Mario,


Thank you for your continuous efforts in this regard.

I have supplied your samples to the development team and requested them to run the tests. As soon as I hear anything from their end, I will let you know here.

Regards,

Hi Babar,

as the saying goes: “no news, good news”. Still, I’m a little bit worried about not hearing anything from your side for almost a week.

Regards
Mario Rossi

Hi Mario,


Sorry for my delayed response.

Previously we had provided 3 images (containing 60 barcodes) to the development team, so they can test them against the upcoming version of Aspose.BarCode for .NET. Please check the below results for your reference,

  1. test-hi.png: All 20 barcodes got recognized with correct CodeText
  2. test-med.png: All barcodes from 1.2 to 3.6 got recognized with correct CodeText.
  3. test-low.png: Only 1.2, 1.6 and 1.8 got recognized. Among these, 1.2 barcodes gave incorrect CodeText in 2nd iteration.
Please let us know, how can we help further.
Thanks and Regards,

Hello,

nice to hear that many codes get recognized correctly. What’s peculiar, however, is that the larger codes in test-low.png are not recognized and that only 1.2, 1.6 and 1.8 are identified. I would have expected that codes with larger “pixels” were easier to recognized than those with finer structure.

Since my evaluation license will expire in less than 2 weeks, it would be helpful either:

  • to get a newer release that I can test in the remaining time before expiration of the license
  • or to have the chance to obtain another evaluation license once the newer release will be published
Regards
Mario Rossi
Hi Mario,
mrossi:
  • to get a newer release that I can test in the remaining time before expiration of the license
We have recently published Aspose.BarCode for .NET v4.8.0. If you like you can evaluate the .NET version of the product cause this is the same version that we used to test your recently provided samples. Also, as discussed earlier, .NET product will be eventually ported out to release the Java version.

Please note, if you have previously acquired Aspose.BarCode for java license then you may have to request for a Aspose.BarCode for .NET or Aspose.BarCode Product Family license in order to use the .NET product in licensed mode.

mrossi:
  • or to have the chance to obtain another evaluation license once the newer release will be published
I believe, it will be possible. You may have to approach our sales team through Aspose.Purchase forum.
Regards,

The issues you have found earlier (filed as BARCODJAVA-33156) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.