Barcode CODE39 reading problem

Hello.
Barcode is not found in this file ((

12.JPG (245.6 KB)

@fuckel83

Please share your sample code showing how the barcode is generated so that we could investigate in detail.

Of course, it is from example:

    BarCodeReader reader = new BarCodeReader("D:/1/24.JPG", DecodeType.CODE_39_STANDARD);
    reader.setRecognitionMode(RecognitionMode.MaxBarCodes);
    while (reader.read()) {
    System.out.println("Type: " + reader.getCodeType() + " Text: " + reader.getCodeText());
    }

@fuckel83

Please follow the code sample given below to generate the Barcode:

BarCodeBuilder  generator = new BarCodeBuilder ();
String codeText = "EAA000000G5FP";
generator.setCodeText(codeText);
generator.setEncodeType(EncodeTypes.CODE_39_STANDARD);
generator.save(dataDir + "Code39Standard_1.jpg");

For reading generated barcode, please follow the code sample given below:

BarCodeReader reader = new BarCodeReader(dataDir + "Code39Standard_1.JPG", com.aspose.barcode.barcoderecognition.DecodeType.CODE_39_STANDARD);
reader.setRecognitionMode(RecognitionMode.MaxBarCodes);
while (reader.read()) {
     System.out.println("Type: " + reader.getCodeType() + " Text: " + reader.getCodeText());
}

Moreover, we were able to reproduce this issue and have logged it with ID “BARCODEJAVA-573” for further investigation. You will automatically be informed here once we have more information to share.

Thanks a lot. But I need to recognized barcodes generated by other source systems. ((

@fuckel83

Thank you for your feedback.
We are working on this issue and we will update you as soon as we have more information to share with you.

Thanks a lot.
Another one barcode (((
31.JPG (193.1 KB)

And one more… Recognized: EAK00%0%0644%
33.JPG (194.3 KB)

And one more… Recognized:
Type: Code39Standard Text: A1VUA1UUA11X
Type: Code39Standard Text: C1VUA1UUA11X
Type: Code39Standard Text: UA171
Is not correct… ((

37.JPG (74.3 KB)

@fuckel83

We have recorded the details and are considering these images as well for the issue resolution.

Most of these barcodes have double types of errors noise and blur. It is difficult combination of error which makes some images unrecognizable.

The second main problem here is Code39 which was developed in 1974 and doen’t have any checksum. It is just set of bar unions and it has the same error correction as ordinary text. In this way it suffers from the same issues as any machine reading text systems. After the recognition so corrupted Code39 we cannot check if this barcode is correct, and this leads to the situation when barcode can be recognized incorrectly on even not recognized.

If you want in 2018 to use some barcodes with strong checksum in your documents I advice you to use some barcodes with strong checksum like QR, Datamatrix or PDF417. Datamatrix and PDF417 has rectangular barcodes which can be fit to the same area as Code39.

We will try to fix this issue, but some barcodes of this type could stay incorrectly recognized or even not recognized.

Hello. Thanks a lot. I would like to use but I couldn’t change the type of barcode in other systems. But I’ll try to create a request(task) for these systems.
Have a nice day!

The issues you have found earlier (filed as BARCODENET-37010) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by muhammadahmad

Hello. Thanks a lot! We have install into production environment with Alfresco.
Works fine. Best code recognition library
Best regards,
Pavel.

@ivanovpavel1983,

Thanks for your feedback.

Good to know that the latest version fixes your issue now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thanks a lot!
Have some new cases ((
Wrong codes…
EAK07ZZU36662.JPG (17.3 KB)
EAMAG0001NE0T.JPG (14.5 KB)
EAMKTTTTKTTBH.JPG (33.1 KB)
EAMA60001NN79.JPG (28.6 KB)

@ivanovpavel1983,
I have checked all the files using latest version 19.4 with the following sample code:

    BarCodeReader reader = new BarCodeReader(fileName, DecodeType.CODE_39_STANDARD);
    reader.setBarCodeReadType(DecodeType.ALL_SUPPORTED_TYPES);
    while (reader.read()) {
        System.out.println("Type: " + reader.getCodeType() + " Text: " + reader.getCodeText());
    }

Following are the results:

EAK07ZZU36662.JPG => EAK0000236662 (CORRECT)
EAMA60001NN79.JPG => EAA000001NN79 (CORRECT)
EAMKTTTTKTTBH.JPG => PQMLTTTTKOTBH (WRONG)
EAMAG0001NE0T.JPG => EAA000001NE0T (CORRECT)

It seems that you are using some older version. You may please test it again with the latest version and share the feedback. We will log the issue after your feedback.

Thanks a lot!
And I used
BarCodeReader reader1 = new BarCodeReader(inputStream, DecodeType.CODE_39_STANDARD);
without
reader.setBarCodeReadType(DecodeType.ALL_SUPPORTED_TYPES);
((
Have a nice day!
Best regards,
Pavel

@ivanovpavel1983,
Good to know that your issue is sorted out by the suggested line of code. Feel free to contact us at any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Hello.
There was a problem with pdf to png conversion. (((
Old code:
Resolution resolution = new Resolution(1000);
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.setCompression(CompressionType.RLE);
tiffSettings.setDepth(ColorDepth.Format8bpp);
tiffSettings.setSkipBlankPages(true);
tiffSettings.setIndexedConversionType(TiffSettings.IndexedConversionType.Pixelated);
TiffDevice tiffDevice = new TiffDevice(2480, 3508, resolution, tiffSettings);

And the better solution is

Resolution resolution = new Resolution(2000);
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.setCompression(CompressionType.None);
tiffSettings.setDepth(ColorDepth.Default);
tiffSettings.setSkipBlankPages(true);
tiffSettings.setIndexedConversionType(TiffSettings.IndexedConversionType.Pixelated);
TiffDevice tiffDevice = new TiffDevice(2480, 3508, resolution, tiffSettings);

May be you recommend some addtional parameters?

best regards, Pavel