Hello,
We have updated our Aspose.Barcode for .NET from version 5.7.0.0 to 6.8.0.0 and noticed an impact in barcode recognition efficiency. Attached contains sample projects to demonstrate the said behavior. Given the same code implementation, the barcode reader from 5.7.0.0 can read all four barcodes from the image, while the one from 6.8.0.0 can only read two. We also tried using different orientation hints since some of the barcodes in the sample image are rotated, but the latest version still didn’t match the efficiency given by the 5.7.0.0 version.
Kindly advise if this is an issue with the DLL or there was just something missing from the code sample provided.
NOTE: License file is removed for security purposes.
Hi Angelo,
Thank you for contacting support. We can read all codes with invert image filter. It also reads one code two times. For the sake correction, we have logged it under ticket id BARCODENET-34133 in our issue tracking system. We’ll keep informed regarding any available updates. We’re sorry for the inconvenience caused.
[.NET, C#]
int count = 1;
using (BarCodeReader reader = new BarCodeReader(ImgPath, type))
{
reader.ImageBinarizationHints = RecognitionHints.ImageBinarization.InvertImage;
while (reader.Read())
{
Console.WriteLine(count + " - Code Text: " + reader.GetCodeText() + " | Type: " + reader.GetReadType());
count++;
}
}
Results:
1 - Code Text: C16-4 | Type: Code128
2 - Code Text: A16-4 | Type: Code128
3 - Code Text: D16-4 | Type: Code128
4 - Code Text: B16-4 | Type: Code128
5 - Code Text: B16-4 | Type: Code128
Hello Imran,
Thanks a lot for the hint to read all the barcodes! On the other hand, can you provide an estimated date for the BARCODENET-34133 fix? If not, is there any way we can be updated when the fix is done? I believe we don’t have access to the issue tracking system, so we would greatly appreciate if there’s a way we can keep our team posted on its progress.
Also, we’d like to confirm why the barcodes are read for the same image in version 5.7.0.0 without setting the ImageBinarizationHints. Does this mean that we should always use the InvertImage setting moving forward?
Best Regards,
Angelo
Hi Angelo,
Thank you for the inquiry. This issue has just been identified. Our product team requires a little time to investigate it. Once it is fixed, then you will get an email intimation. Furthermore, we keep our customers informed regarding any available updates.
asposeuserdev:
we'd like to confirm why the barcodes are read for the same image in version 5.7.0.0 without setting the ImageBinarizationHints.
Before a new version of a software product is released, the common core test cases are run against the new version to make sure that all the old capabilities work, but still it is possible to have a regression issue because of the improvements or while adding a complex feature support. However, we have a separate queue for the issue which appeared in this category. Our development team tries its best to avoid such issues.
asposeuserdev:
Does this mean that we should always use the InvertImage setting moving forward?
Furthermore, it does not mean that you will always use an invert image filter. Sometimes, users have a set of complex images, so they can apply checks in the source code to deal with them. After this fix, you will be able to read all codes without applying filters. We have logged our comments against this ticket.
Hi Angelo,
Sure, we will keep you informed of any progress and let you know in this forum thread.
The issues you have found earlier (filed as BARCODENET-34133) have been fixed in Aspose.BarCode for .NET 7.0.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Guys,
Angelo is not anymore in our team.
We haven’t tested the fix with the 7.0.0.0 version, but I’m using the newest one 7.2.0.0 and still have the same issue, it only reads one barcode from a image with 4 barcodes.
I’m attaching the code with the new dll being used.
Take a note at the comments added in the method CreateImageWithBarcode()
I’m also using the code provided from you to count the barcodes.
I hope to hear from you,
Please let me know if there is something wrong with the code.
Thanks
Abner
Hi Abner,
Thank you for contacting support. We have tested your sample code against the latest build of Aspose.BarCode for .NET 7.2.0. It reads all Code128 codes by using the invert image filter. Please modify your sample code as follows:
[.NET, C#]
static void ReadAllBarcodes(Bitmap img)
{
int count = 1;
using (BarCodeReader reader = new BarCodeReader(img))
{
reader.RecognitionMode = RecognitionMode.ManualHints;
reader.ManualHints = ManualHint.InvertImage;
while (reader.Read())
{
Console.WriteLine(count + " - Code Text: " + reader.GetCodeText() + " | Type: " + reader.GetReadType());
count++;
}
}
}
Results:
-------------
1 - Code Text: A1-1 | Type: Code128
2 - Code Text: A1-1 | Type: Code128
3 - Code Text: A1-1 | Type: Code128
4 - Code Text: A1-1 | Type: Code128
Please let us know in case of any ambiguity or questions.
Note: the reported issue id BARCODENET-34133 was about some different barcode image and Aspose.BarCode APIs can read all codes from it without applying any filter.
Hi Abner,
Thank you for updating us. It's nice to hear from you that the problem has been resolved. Please let us know in case of any other query or questions about the Aspose APIs.