←Select platform

Process Method

Summary

Analyzes input image that represents a camera frame by detecting, recognizing, and parsing MRZ code.

Syntax

C#
C++/CLI
Python
public MRZReader Process( 
   RasterImage image 
) 
public:  
   MRZReader^ Process( 
      RasterImage^ image 
   ) 
def Process(self,image): 

Parameters

image

A RasterImage reference.

Remarks

This function should receive feeds of the same ID card and in due time construct a single frame from all these feeds. Finally, it will automatically parse the MRZ code.

Example

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Forms.Commands; 
 
 
public void ProcessMRZCode(RasterImage rasterImage) 
{ 
   IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD); 
   ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir); 
 
   if (ocrEngine.SettingManager.IsSettingNameSupported("Recognition.RecognitionModuleTradeoff")) 
      ocrEngine.SettingManager.SetEnumValue("Recognition.RecognitionModuleTradeoff", "Accurate"); 
 
   MRZReader reader = new MRZReader(); 
   reader.MRZReaderOCR(ocrEngine); 
   var results = reader.Process(rasterImage); 
 
   if (reader.Results != null) 
   { 
      foreach (var item in reader.Results) 
      { 
         Console.WriteLine("Field name : " + item.Key.ToString() + "Value : " + item.Value.ToString()); 
      } 
   } 
 
   reader.Dispose(); 
} 
 
 
static class LEAD_VARS 
{ 
   public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS22\Bin\Common\OcrLEADRuntime"; 
} 

Requirements

Target Platforms

See Also

MRZReader Class

MRZReader Members

Leadtools.Forms.Commands Namespace

Help Version 22.0.2023.4.12
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.