Barcode not recognized on low res tiff


#1

Hi,

I have a lot of low res images were I need to recognize the barcode. On a batch of 1000 I normaly score about 98% but there are always some images that are giving troubles.
In attachment 3 files : ok.tiff is one that works without any problems.
original.tiff is one were no barcodes are recognized.
cropped.tiff is a smaller version because I thought that the images at the top were giving problems.

Even after trying a lot of QualitySettings the library never seems to recognize the barcode ( which should start with JJBEA ).

Any suggestions please,

Kind regards,

Guillaume

Images.zip (36.2 KB)


#2

@GUENHOME,

Thanks for the image files.

Which version of Aspose.BarCode API you are using. I tried using our latest version/fix: Aspose.BarCode for .NET v19.2.x and it works fine for all three images in the zipped archive. I am using the following sample code to test the issue:
e.g
Sample code:

            var bmp = new Bitmap("E:\\test2\\original.tiff");//other files also work fine
            Aspose.BarCode.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader(bmp, Aspose.BarCode.BarCodeRecognition.DecodeType.AllSupportedTypes);
            if (reader.Read())
            {
                Console.WriteLine(reader.GetCodeText());
            } 

Let us know with sample code (runnable) and details if you still find the issue with latest version, we will check it soon.


#3

Hi Amjad,

It scan something but most of the time is garbled data. As you can see from the 10 files, correct.zip, the barcode should start with JJBEA12995 and have a length of 18 characters ( it’s a EAN128 barcode that is used by the Belgium Postal services ).
In the faulty.zip there are a number of files which don’t return the correct barcode.

I’m am using version 19.2.0.

I am aware that the quality is very low but I can’t get better quality from the source. Strange thing is that only about 2% isn’t recognized and if I compare the images I don’t see a big difference.

Thx,

Guillaume
Correct.zip (45.0 KB)
Faulty.zip (47.1 KB)


#4

@GUENHOME

I have logged a ticket with an id “BARCODENET-37147” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.


#5

Ok thanks.

Guillaume


#6

@GUENHOME,

You are welcome.


#7

Description.zip (13.5 KB)
I have checked all of existing barcode recognition engines, some images were recognized in unstable mode, some images cannot be recognized by any side engine .

I investigated problem more deeply and found that problem exists in fully wiped bars in the barcode.

Let’s see extracted and rotated barcode image from JJBEA129955634110501202_Front.tiff , which cannot be recognized by any side engine.

As you can see on marked.png , our engine recognizes three bar symbol unions correctly as: Stop(106) value, Checksum(36) value and 2(18) value (this is Start Code B encoding). The next value is recognized correctly only after manual edition. Correct value must be 0(16) but white bar is fully wiped, as you can see on image faulty_cut_rot_202.png , and engine recognizes P(48).

However I found some barcodes (from the failed set) which could be recognized after some fixes to recognition algorithm. These barcodes sometimes has 2-3 pixels of correct bar. I will investigate improvements to 1D algorithm in April and could provide fix in 19.5, 19.6 version(June 2019). The main problem here is weak checksum of code128 barcode type, which makes difficulties to check if barcode is recognized correctly.

In this way, I cannot assure you that I will find fix for this problem but I will try to find in April/2019. This fix reduces count of unrecognized barcodes but it cannot fix them all.

You can see additional information about the barcode the code128 description


#8

Hi Alexander,

Ok thanks for the info.

I know that the poor barcode quality is a issue but sadly enough I have no control over that. The images are generated by a Vantage sorter and due to the high speed, more then 100.000 images per day, they can’t improve the quality.

Will I get some kind of notification when the version, with the improved algorithm, is released?

Kind regards,

Guillaume


#9

@GUENHOME,
We have logged your comments for our reference. Regarding the notification, we will write back here immediately as soon as any feedback is available to share.


#10

You always get notification when task is fixed (with any Aspose task). The task could be fixed with 1D algorithm improvements which is planned for the April 2019 (there are also some additional tasks for 1D improvements).


#11

@GUENHOME,

New public property AllowOneDWipedBarsRestoration has been added to the QualitySettings.
It allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
Property is enabled by default in HighQuality, MaxBarCodes modes.
Currently the property is used for Code128, GS1Code128, SCC14, EAN14, SSCC18, AustralianPosteParcel, SwissPostParcel barcode types.

using (BarCodeReader reader = new BarCodeReader("file.tiff", DecodeType.Code128))
{
    reader.QualitySettings.AllowOneDWipedBarsRestoration = true;
    List<string> lCodetexts = new List<string>();
    while (reader.Read())
        lCodetexts.Add(reader.GetCodeText());
} 

We will notify you as soon as next version will be released.


#12

Hi,

Ok thanks that looks like a good solution.
Is there a ETA for the next release?

Kind regards,

Guillaume


#13

@GUENHOME,

Our next official release, i.e., Aspose.BarCode for .NET v19.5 will include the fix. The version is expected to be released in the next month. There is no exact date of release as release is published when ready. Once we publish the release, you will be automatically notified.

Keep in touch.


#14

The issues you have found earlier (filed as BARCODENET-37147) have been fixed in Aspose.BarCode for .NET 19.6. This message was posted using BugNotificationTool from Downloads module by ahsaniqbalsidiqui