←Select platform

MRTDField Enumeration

Summary

Represents MRTD Field.

Syntax
C#
VB
Objective-C
C++
Java
public enum MRTDField  
Public Enum MRTDField  
typedef NS_ENUM(NSInteger, LTMRTDField) 
public final class MRTDField 
    extends java.lang.Enum<MRTDField> 
public enum class MRTDField  

Members
ValueMemberDescription
0Type The Type of the Document.
1DocumentCode The Code of the Document.
2DocumentNumber The Number of the Document.
3PassportNumber The Number of the Passport.
4IssuingState The Issuing State of the Document.
5Name The Name of the Document Holder.
6LastName The Last name of the Document Holder.
7Sex The Sex of the Document Holder.
8Nationality The Nationality of the Document Holder.
9DateOfBirth The Date Of Birth for the Document Holder.
10DateOfExpiry The Date Of Expiry for the Document.
11ValidUntilDate Valid Until Date for the Document.
12OptionalData The Optional Data for the Document.
13OptionalData2 The Optional Data for the Document(some documents has two optional Data).
14IDCardNumber The number of the Identification Card.
100PassportNumberCheckDigit The Check Digit for Passport number.
101DocumentNumberCheckDigit The Check Digit for the Document number.
102IDCardNumberCheckDigit The Check Digit for the Id Card number.
103DateOfBirthCheckDigit The Check Digit for the Date Of Birth.
104DateOfExpiryCheckDigit The Check Digit for the Date Of Expiry.
105ValidUntilDateCheckDigit The Check Digit for the "Valid Until Date" field.
106OptionalDataCheckDigit The Check Digit for Optional Data.
107CompositeCheckDigit The Composite Check Digit.
108OverallCheckDigit The Overall Check Digit.

Remarks

MRTDField is used in MRTDDataElement to show the data element related field.

Example
C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Forms.Commands; 
 
public void TestMRTDReader() 
{ 
   // Initialize the RasterCodecs class 
   RasterCodecs codecs = new RasterCodecs(); 
 
   // Initialize the BankCheckReader class 
   MRTDReader mrtdReader = new MRTDReader(); 
 
   // The bank cheque image 
   string chequePath = Path.Combine(LEAD_VARS.ImagesDir, "MRZ_SAMPLE.jpg"); 
   RasterImage image = codecs.Load(chequePath); 
 
   IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false); 
   ocrEngine.Startup(codecs, null, null, LEAD_VARS.OcrLEADRuntimeDir); 
 
   // Assign Engine to Reader 
   mrtdReader.OcrEngine = ocrEngine; 
 
   // Process Image 
   mrtdReader.ProcessImage(image); 
 
   if (mrtdReader.Errors == MRTDErrors.NoError) 
   { 
      foreach (var value in mrtdReader.Results) 
      { 
         Console.WriteLine(string.Format("Data Element Field: {0}", value.Key.ToString())); 
         Console.WriteLine(string.Format("Data Element Value: {0}", value.Value.ReadableValue)); 
         Console.WriteLine(string.Format("Data Element Code : {0}", value.Value.MrzCharacters)); 
         Console.WriteLine(string.Format("Data Element Valid: {0}", value.Value.IsValid.ToString())); 
         Console.WriteLine("************************************"); 
      } 
   } 
 
   ocrEngine.Shutdown(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images"; 
   public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS 20\Bin\Common\OcrLEADRuntime"; 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.Forms.Common 
Imports Leadtools.Ocr 
Imports Leadtools.Forms.Commands 
 
Public Sub TestMRTDReader() 
   ' Initialize the RasterCodecs class 
   Dim codecs As New RasterCodecs() 
 
   ' Initialize the BankCheckReader class 
   Dim mrtdReader As New MRTDReader() 
 
   ' The bank check image 
   Dim chequePath As String = Path.Combine(LEAD_VARS.ImagesDir, "MRZ_SAMPLE.jpg") 
   Dim image As RasterImage = codecs.Load(chequePath) 
 
   Using ocrEngine As IOcrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, False) 
      ocrEngine.Startup(Nothing, Nothing, Nothing, "C:\LEADTOOLS 20\Bin\Common\OcrLEADRuntime") 
      ' Assign Engine to Reader 
      mrtdReader.OcrEngine = ocrEngine 
 
 
 
      ' Process Image 
      mrtdReader.ProcessImage(image) 
 
      If mrtdReader.Errors = MRTDErrors.NoError Then 
         For Each value As KeyValuePair(Of MRTDField, MRTDDataElement) In mrtdReader.Results 
            Console.WriteLine(String.Format("Data Element Field: {0}", value.Key.ToString())) 
            Console.WriteLine(String.Format("Data Element Value: {0}", value.Value.ReadableValue)) 
            Console.WriteLine(String.Format("Data Element Code : {0}", value.Value.MrzCharacters)) 
            Console.WriteLine(String.Format("Data Element Valid: {0}", value.Value.IsValid.ToString())) 
            Console.WriteLine("************************************") 
         Next 
      End If 
   End Using 
End Sub 
 
Public NotInheritable Class LEAD_VARS 
   Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images" 
End Class 

Requirements

Target Platforms

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

Leadtools.Forms.Commands Assembly