←Select platform

ParallelProcess Method

Summary

Parallel processing of a raster image to extract ID data from the text, barcode, and MRZ zones.

Syntax

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

Parameters

image

A RasterImage reference.

Example

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Forms.Commands; 
 
 
void IDCardParse(RasterImage image) 
{ 
   IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD); 
   ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir); 
 
   var path = Path.Combine(LEAD_VARS.OcrLEADRuntimeDir ?? String.Empty, "LEAD.Binarize.bin"); 
 
   IDFrameReader idFrameReader = new IDFrameReader(File.ReadAllBytes(path), ocrEngine); 
 
   var ready = idFrameReader.ParallelProcess(image); 
 
   if (ready.Ready) 
   { 
      if (idFrameReader.Results != null) 
      { 
         foreach (var res in idFrameReader.Results) 
         { 
            Console.WriteLine("Field name : " + res.Key + "Value : " + res.Value); 
         } 
      } 
   } 
 
   ocrEngine.Shutdown(); 
   ocrEngine.Dispose(); 
} 
 
 
static class LEAD_VARS 
{ 
   public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS22\Bin\Common\OcrLEADRuntime"; 
} 

Requirements

Target Platforms

See Also

IDFrameReader Class

IDFrameReader 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.