Region points and image accuracy

I’ve noticed that in all the results that are wrong, the x values of the first point are always much larger than the correct ones.

My question is should this be a way in additional to recognition quality to gauge if when using in automation if results should be kept.

@pastageek

Thank you for writing to us.
It is requested to please share sample file and your code as well so that we could investigate this issue.

varcod10.jpeg (347.0 KB)
varcode6.jpeg (247.3 KB)
varcode5.jpeg (311.8 KB)
varcode8.jpeg (250.9 KB)
varcode2.jpeg (456.4 KB)
varcode1.jpeg (517.1 KB)
varcode5.jpeg (311.8 KB)
varcode3.jpeg (527.9 KB)
varcode7.jpeg (277.7 KB)
varcode2.jpeg (456.4 KB)

Sure thing

foreach (var filename in openFileDialog.FileNames) {
var asposeResults = new List();
Aspose.BarCode.License licence = new Aspose.BarCode.License();
licence.SetLicense(@“C:\FileRepository\ShipSystemRepository\Aspose.BarCode.lic”);
var reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader();
var bitmap = new System.Drawing.Bitmap(filename);

reader.SetBarCodeImage(bitmap, new System.Drawing.Rectangle[] { new System.Drawing.Rectangle(0, 0, bitmap.Width, bitmap.Height) });
reader.QualitySettings = Aspose.BarCode.BarCodeRecognition.QualitySettings.HighQuality;
reader.SetBarCodeReadType(Aspose.BarCode.BarCodeRecognition.DecodeType.UPCA);
reader.ChecksumValidation = Aspose.BarCode.BarCodeRecognition.ChecksumValidation.On;

while (reader.Read()) {
var region = reader.GetRegion();
var regionString = string.Join(" “, region.Points.Select(s => $”({s.X},{s.Y})"));
asposeResults.Add($"{reader.GetCodeText()} checksum:{reader.GetCheckSum()} recogQuality:{reader.GetRecognitionQuality()}" +
$" IsDeniable:{reader.GetIsDeniable()} + Angle:{reader.GetAngle()}{Environment.NewLine}{regionString}");
}
resultsList.Add($"{string.Join(", “, asposeResults)} {System.IO.Path.GetFileName(filename)}”);

}

From this, I see that varcodes 2,3, & 4 are incorrect, and here is the dump showing the pattern I’m asking about:

30400302601 checksum:3 recogQuality:94.60749 IsDeniable:False + Angle:0
(130,970) (1247,944) (1252,1009) (123,1017) varcode1.jpeg

30400302678 checksum:5 recogQuality:87.96665 IsDeniable:False + Angle:185
(1347,1089) (213,957) (225,903) (1356,1041) varcode2.jpeg

30400302602 checksum:0 recogQuality:89.34279 IsDeniable:False + Angle:175
(1296,918) (243,987) (246,960) (1290,876) varcode3.jpeg

30400302678 checksum:5 recogQuality:87.96665 IsDeniable:False + Angle:185
(1347,1089) (213,957) (225,903) (1356,1041) varcode4.jpeg

31600060084 checksum:4 recogQuality:94.34579 IsDeniable:False + Angle:355
(69,857) (1187,755) (1207,949) (64,912) varcode5.jpeg

30400302601 checksum:3 recogQuality:88.58121 IsDeniable:False + Angle:5
(79,884) (1346,802) (1359,833) (69,923) varcode6.jpeg

30400302601 checksum:3 recogQuality:91.68457 IsDeniable:False + Angle:0
(140,944) (1403,904) (1410,969) (133,1005) varcode7.jpeg

31600060084 checksum:4 recogQuality:86.69743 IsDeniable:False + Angle:5
(96,1074) (1389,1011) (1410,1182) (90,1149) varcode8.jpeg

31600060084 checksum:4 recogQuality:94.34502 IsDeniable:False + Angle:355
(69,858) (1187,755) (1207,949) (64,916) varcode9.jpeg

31600060084 checksum:4 recogQuality:94.39764 IsDeniable:False + Angle:0
(310,1384) (1378,1422) (1384,1560) (303,1440) varcod10.jpeg

All three of the wrong ones start with an x position that’s much further to the right. Is this normal, and can it be relied upon as something to say that it isn’t great in addition to the recognition quality?

@pastageek

We have logged this issue with ID “BARCODENET-37034” for further investigation. You will automatically be informed here once we have more information to share.

@pastageek

The following image files are missing, could you please upload?:

  1. varcode4.jpeg
  2. varcode9.jpeg

It won’t let me upload those two for some reason. Every time I try it says varcode2 and varcode5.

@pastageek

You may share download link by uploading the files to third party storage like as GDrive or DropBox. The file upload size on Aspose Forums is limited to 3 MB.

The issues you have found earlier (filed as BARCODENET-37034) have been fixed in Aspose.BarCode for .NET 19.11. This message was posted using Bugs notification tool by Amjad_Sahi

@pastageek,

In version 19.11 we’ve introduced new barcode detection algorithm that is able to detect damaged barcodes. Use this setting to detect your barcodes:

barcodeReader.QualitySettings.DetectorSettings = BarcodeSvmDetectorSettings.HighQuality;