How to use Apose.Barcode to recognize an image to text?

Hi,Support:

Would you provide me a full demo how to recognize an QRCode- image to text based on VB.net?

Thanks!

@ducaisoft,

We don’t provide VB.NET demos, we only provide standalone C# demos @ github repos. and Aspose.BarCode documentation. Anyways, see the VB.NET code segment on how to recognize QR code and extract code text and code type attributes.
e.g.
Sample code:

Dim path = "g:\test2\"
'recognize image
Using read As BarCodeReader = New BarCodeReader($"{path}barcode_new.png", DecodeType.QR)
     For Each result As BarCodeResult In read.ReadBarCodes()
         Console.WriteLine($"CodeText:{result.CodeText}")
         Console.WriteLine($"CodeType:{result.CodeType.ToString()}")
         Console.WriteLine($"CodeTypeName:{result.CodeTypeName}")
     Next
End Using

Hope, this is helps a bit.

Thanks!

And a new issue appear is that some QR Image fail to be sucessfully recognized. Please investiage and fix it.

QR1.jpg (89.3 KB)

QR2.jpg (101.5 KB)

MiniAPp.jpg (23.3 KB)

@ducaisoft,

We will be looking into your issue soon. But apparently, it seems, your barcode images are relevant to QR Art barcodes and its recognition is non-standard. We need to improve recognition for QR Art barcodes, but it might take sometime.

@ducaisoft,

I did test your scenario/case using your QR codes (images) and it works fine with latest versions of the API(e.g., Aspose.BarCode for .NET v23.12/ 24.1). Aspose.BarCode correctly detects the QR barcodes (code text, code type, etc.) from your attached images. So, kindly try newer versions of the library.
I am using the following C# code with your both QR barcode images:
e.g.
Sample code:

var bmp1 = "g:\\test2\\QQ名片.jpg";
//var bmp1 = "g:\\test2\\微信名片.jpg";
using (Aspose.BarCode.BarCodeRecognition.BarCodeReader reader1 = new Aspose.BarCode.BarCodeRecognition.BarCodeReader(bmp1, Aspose.BarCode.BarCodeRecognition.DecodeType.QR))
{
   reader1.QualitySettings = Aspose.BarCode.BarCodeRecognition.QualitySettings.MaxBarCodes; 
   Console.WriteLine(reader1.ReadBarCodes().Length);
   

    foreach (Aspose.BarCode.BarCodeRecognition.BarCodeResult result1 in reader1.ReadBarCodes())
    {
        // Read symbology type and code text
        Console.WriteLine("Symbology Type: " + result1.CodeType);
        Console.WriteLine("CodeText: " + result1.CodeText);
    }
}

output:

1
Symbology Type: QR
CodeText: https://qm.qq.com/q/tg2URD9YIw

Let us know with exact sample code and barcode images if you find any issue.

Yes!
They are QR Art barcodes, not standard QR Image, however, Using cell-phone’s scanning those QR Image, they can be recognized!

@ducaisoft,

Please check my previous reply as Aspose.BarCode also detects both QR code images.

I Try the version 24.01, it still fails to recognize the second and the third one, only the first QRCode image can be done!

@ducaisoft,

Third one may not be detected being QR Art barcodes until we enhance the APIs.

First two barcodes are detected. Please specify the quality settings to detect the second one:
reader1.QualitySettings = Aspose.BarCode.BarCodeRecognition.QualitySettings.MaxBarCodes

@ducaisoft
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): BARCODENET-38909

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.