We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

High quality scanned datamatrix not recognising


This pertains to version 5.5.

Please find attached a few examples of images which are not working. And even worse are returning incorrect code text.

I’ve tried these images on various online services and they work fine.
& scanlife

First is the most basic image:
Untitled2.jpg - this one isn’t detected automatically by aspose - however if I rotate image by -2 degrees then I get a result but it’s wrong.

The remaining images are all pretty similar. Very basic scanning just simply not working.

Also these barcodes are all generated using the aspose suite as well.

Hi Paul,

Thanks for your inquiry. These bar code images are noisy. I’m able to recognize them using the source code below:

string[] files = Directory.GetFiles(“C:/temp/”);<o:p></o:p>

foreach (string file in files)


using (BarCodeReader reader = new BarCodeReader(file, BarCodeReadType.DataMatrix



reader.ImageBinarizationHints = RecognitionHints.ImageBinarization.MedianSmoothing;

while (reader.Read())


Console.WriteLine(file + " -- Symbol: " + reader.GetReadType() + " Code :" + reader.GetCodeText());




C:/temp/100748+Pg1+Img1.jpg -- Symbol: DataMatrix Code ::AAAAvGg0ByEJ9w|ac
C:/temp/100748+Pg1+Img1.jpg -- Symbol: DataMatrix Code :⌂☻
C:/temp/Untitled.jpg -- Symbol: DataMatrix Code ::AAAAvGg0ByEJ9w|ac
C:/temp/Untitled2.jpg -- Symbol: DataMatrix Code ::AAAAvGg0ByEJ9w|ac

Anyways, I have logged an investigation to check the recognition without MedianSmoothing. I can also observe one extra fake result. This task has been logged under ticket id BARCODENET-33586 in our issue tracking system. Your request has also been linked to this issue and you will be notified as soon as it is supported and available for the public use. We're sorry for the inconvenience.

PS: MedianSmoothing technique gives a perfect result. In more complicated images, less data will be lost by taking the median. MedianSmoothing removes the noise from the image while preserving the image edges. Please visit the documentation page here.


Thanks for the response. Firstly - our MAJOR MAJOR issue with Aspose Barcode recognition is the false positives - almost no other packages give back “junk” barcodes. This is obvsiously very worrying. Please can you revert on this ASAP. Else we will probably start looking at other 3rd party libraries (datamatrix.net is one we may start playing with).

On some minor points:

  1. your documentation is really lacking… https://reference.aspose.com/barcode/net/aspose.barcode.barcoderecognition/barcodereader - it doesn’t give any member for ImageBinarization. So it’s not obvious. Also often the text on a member will be something completely useless like “Property XYZ - this allows you to set the property value.” - hmmm - yes developers typically do know what properties are for - how about some examples or at least proper description.
  2. we have started using a 3rd party library - aforge.net - this provides excellent deskew, filters, etc. I highly suggest that you put some proper examples and documentation around using these kinds of techniques when doing barcode recognition - I do think it’s Aspose’s responsibility to both provide the libary and also give useful examples on how to get the recognition to work in read-world circumstances. At the very least give an indication that the developer will need to use other libraries before passing into aspose.
  3. there is definitely an opportunity for Aspose to go beyond the “basics” and try really help their developers more. If one compares your support to something like devexpress or infragistics you guys are way behind the curve…

I hope this frank feeback helps.

Hi Paul,

Thank you for sharing these details. I already have logged and raised the priority of the issue to High and it will be considered in High Priority issue queue which is the maximum priority level for Aspose.BarCode forum support. So we will keep you updated regarding the issue in this forum thread.

It is to update you that we have added many useful techniques in our documentation and also working to provide more quality oriented articles from time to time. Anyways, I have logged a task to review the API Reference section. This task has been logged under ticket id SUPPORT-1317 in our issue tracking system. We will let you know once it is resolved. Furthermore, please note that we already have online real-world examples where you can use various techniques to generate/recognize the bar code images. Please refer to the following online examples:

Please let me know in case of further assistance or questions.


Thanks for the response. Again - I would have found it immensely helpful to have a page which specifically dealt with the image processing side of things:
bit depth
image sizing
smoothing filters

Also some guidance in terms of barcode size requirements based on the data you want to store and the image quality you will print/scan at.

And finally some info on which barcodes are better at which applications. For instance we were using pdf417 but have moved to DataMatrix since it performs much better with low res scanned docs.

We literally invested more than 1 week of dev & test time trying to manually figure this stuff out ourselves. It would be very useful for Apose to give this barcode scanning primer documenation some real effort.

The links you sent me I have already seen and doesn’t address any of the things I mention in this post.

Help out your customers here a bit more…


Oh and also the links you sent me have broken links off them - I get:

controlling the scan strength during the barcode recognition process (Page Deleted)
A page with this title has been deleted. Contact your space administrator if you would like it restored

And also this page:

It doesn’t tell me WHEN I would use the various options. This really doesn’t give much guidance at all.

Hi Paul,

Thanks for your valuable feedback. We have noted your comments and will provide more enhanced documentation after further investigation. We appreciate you in this regard.
Oh and also the links you sent me have broken links off them - I get:
controlling the scan strength during the barcode recognition process (Page Deleted) A page with this title has been deleted. Contact your space administrator if you would like it restored
It is because these properties are obsoleted in the new versions so far it is not a part of our documentation. I have removed this link from the online examples. We’re sorry for your inconvenience.

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

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