←Select platform

RecognizeQRCode Property

Summary

Indicates whether to enable reading QR symbols.

Xamarin Framework Deprecation

As of LEADTOOLS v23, The cross-platform Xamarin framework has been deprecated and replaced with LEADTOOLS .NET MAUI framework.

For any LEADTOOLS Xamarin apps you have already built, we recommend you migrate to the LEADTOOLS .NET MAUI framework. To help you with the migration, review the LEADTOOLS .NET MAUI tutorials to get you started.

This change is driven by Microsoft's announcement to end Xamarin support.

Syntax
C#
C++/CLI
Python
public bool RecognizeQRCode { get; set; } 
public:  
   property bool RecognizeQRCode 
   { 
      bool get() 
      void set(bool value) 
   } 
RecognizeQRCode # get and set (BusinessCardReader) 

Property Value

true to enable reading QR symbols. Otherwise, false. The default value is false.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Forms.Commands; 
using Leadtools.Barcode; 
 
 
public void TestBusinessCardReader() 
{ 
   // Initialize the RasterCodecs class 
   RasterCodecs codecs = new RasterCodecs(); 
 
   // The business card image 
   string chequePath = Path.Combine(LEAD_VARS.ImagesDir, "original.jpg"); 
   RasterImage image = codecs.Load(chequePath); 
 
   //Start up barcode 
   BarcodeEngine barcodeEngine = new BarcodeEngine(); 
 
   //Start up Ocr engine 
   IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD); 
   ocrEngine.Startup(codecs, null, null, LEAD_VARS.OcrLEADRuntimeDir); 
 
   // Initialize the BusinessCardReader class 
   BusinessCardReader BCReader = new BusinessCardReader(ocrEngine, barcodeEngine); 
 
   BCProcessStatus status = BCReader.Process(image); 
 
   if (status == BCProcessStatus.BlurDetected) 
      Console.WriteLine("Blur detected in image: " + this); 
   else if (status == BCProcessStatus.GlareDetected) 
      Console.WriteLine("Glare detected in image: " + this); 
   else if (status == BCProcessStatus.Failed) 
      Console.WriteLine("Failed to recognize image: " + this); 
   else if (status == BCProcessStatus.Success) 
   { 
      if (BCReader.Results != null) 
      { 
         foreach (var res in BCReader.Results) 
         { 
            LeadRect bounds = res.Value.Bounds; 
            Console.WriteLine(string.Format("Field Name        : {0}", res.Key)); 
            Console.WriteLine(string.Format("Field Value       : {0}", res.Value.Value)); 
            Console.WriteLine(string.Format("Field Confidence  : {0}", res.Value.Confidence)); 
            Console.WriteLine(string.Format("Field Bounds      : {0},{0},{0},{0}", bounds.X.ToString(), bounds.Y.ToString(), bounds.Width.ToString(), bounds.Height.ToString())); 
            Console.WriteLine("************************************"); 
         } 
      } 
   } 
 
   ocrEngine.Shutdown(); 
} 
 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
   public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS23\Bin\Common\OcrLEADRuntime"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.5.23
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms.Commands Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.