$$INTRODUCTION$$ - %%projecttitle%%

Introduction

ClearImageDLID Reader is a set COM components, one for reading the barcodes and the other for extracting data element values from scanned images of driver licenses and ID cards that follow international standards. Reading the barcodes from driver licenses presents particular challenges due to abrasion of the thick clear coating, the reflections from the surface, and often poor printing quality of these documents. Inliet has devloped special enhancement algorithms to compensate for these defects in the ClearImageDLID Readers. To achieve reliable recognition rates, we recommend that the cards be scanned at 300-600dpi in grayscale or in color mode. The ClearImageDLID Reader reads PDF417 barcode as well as 1D barcodes, such as Code 128, which often present on driver licenses and ID cards.

The PDF417 barcode values is parsed according to AAMVA specification as documented in their Personal Identification — AAMVA International Specification — DL/ID Card Design document. This specification has evolved through several revisions since 1996. Various entities initiated their barcode programs at different dates, and therefore followed different guidelines. The ClearImageDLID AAMVA Parser automatically identifies these various formats and correctly obtains the value of data elements.

The ClearImageDLID Reader can be used to obtain barcode values from other types of identification cards, such as DOD Common Access Card, International Seafarers ID cards, passports, non-AAMVA driver licenses and other national ID cards. Contact Inlite Research at sales@inliteresearch.com to develop parser for such documents.

The ClearImageDLID Reader works in conjunction of Inlite's ClearImage COM. The rich file I/O capabilities of ClearImage support the processing of images saved as TIFF, JPEG, PDF and other formats. The ClearImage COM family includes image processing and barcode recognition products to facilitate implementation of additional DL/ID card - related functionalities. Contact Inlite Research at sales@inliteresearch.com is you have any questions.


%%projecttitle%%

ClearImage DLID Reader

Version | 2.0.003
Component filename | ClearImageDLID.dll
Component GUID | {55DF4137-5910-4233-AB30-0AA2AF166934}

Description

ClearImage DLID Reader

Object Model

Reader (Class Module)

Element (Class Module)

ParserAAMVA (Class Module)


$$GETTING_STARTED$$ - %%projecttitle%%

Install

The runtime component, help file and source code examples of the ClearImageDLID Reader are installed ny the ClearImage COM SDK installer.

Try ClearImage Demo

Before developing any code try reading Driver License values in ClearImage Demo application.

  • Start the demo application at Start menu -> Programs-> ClearImage -> ClearImage Demo
  • Open your image file from File menu
  • Read Driver License / ID from PDF417 menu.

Develop code

These are basic steps to read data from Driver License barcode:

  • Use Read2D method to obtain raw value of PDF417 barcode
  • Pass this value to Parse method
  • Iterate through Elements to obtain value of each data element stored in barcode

To develop code use source code examples in Start menu -> Programs-> ClearImage -> DL-ID Reader. Review the reference topics in this manual. Help file topics discus operational details and show simplified code examples in VB6 and C#.

Contact Inlite support if you have any questions: support@inliteresearch.com

Use in production

Production use of ClearImageDLID Reader requires a license, which may be purchased at Inlite Web Site.

Contact Inlite sales to discuss production use options.


%%localitemtitle%%

Element Object

Members

Properties
Description | Read-only property | Description of Data Element
Id | Read-only property | ID of Data Element
isSet | Read-only property | True, if Data Element present in 2D barcode
Value | Read-only property | Value of Data Element


%%localitemtitle%%

Description Property

Description

Description of Data Element

Property type

A String value.

Syntax

object.Description

The Description Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Element.


%%localitemtitle%%

Id Property

Description

ID of Data Element

Property type

A String value.

Syntax

object.Id

The Id Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Element.


%%localitemtitle%%

isSet Property

Description

True, if Data Element present in 2D barcode

Property type

A Boolean value.

Syntax

object.isSet

The isSet Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Element.


%%localitemtitle%%

Value Property

Description

Value of Data Element

Property type

A String value.

Syntax

object.Value

The Value Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Element.


%%localitemtitle%%

ParserAAMVA Object

Members

Methods
Parse Parse input string

Properties
AamvaVer | Read-only property | AAMVA Version Number
Elements | Read-only property | List of Element objects
Error | Read-only property | Parsing Error Information. Empty string if no error
FileType | Read-only property | File Type designator
Issuer | Read-only property | Issuer Identification Number (IIN)
JurisdictionVer | Read-only property | Jurisdiction Version Number
NumberOfEntries | Read-only property | Number of different Subfile types


%%localitemtitle%%

Parse Method

Description

Parse input string

Returns

A Boolean value.

Syntax

object.Parse (Text)

The Parse Method syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.
Text | Required. A String value. 2D Barcode Text value

Example

[Visual Basic]

' In VB6 Project menu Add Reference to:
' ClearImage COM Server
' ClearImageDLID Reader

Public Sub Read_2D(sFile As String)
On Error GoTo except
' Create Reader
Dim oReader As New ClearImageDLID.Reader
' Open image from file
oReader.Image.Open sFile
' Find barcodes
Dim Bc As CiBarcode
Set Bc = oReader.Read2D
' Process Results
If (Not Bc Is Nothing) Then MsgBox Parse_AAMVA(Bc.text)
If (Bc Is Nothing) Then MsgBox "NO 2D Barcode"
Exit Sub
except:
MsgBox "ERROR: " & Err.Description
End Sub

Public Function Parse_AAMVA(text As String) As String
' Create Parser
Dim oParser As New ClearImageDLID.ParserAAMVA
' Do Parsing
If (oParser.Parse(text)) Then
Dim s As String
' Display Results
s = s & "FileType = " & oParser.FileType & vbCrLf
s = s & "Issuer Identification Number = " & oParser.Issuer & vbCrLf
s = s & "AAMVA Ver = " & oParser.AamvaVer & vbCrLf
s = s & "Jurisdiction Ver = " & oParser.JurisdictionVer & vbCrLf
s = s & "Number of Entries = " & oParser.NumberOfEntries & vbCrLf

Dim d As ClearImageDLID.Element
s = s & " == ELEMENTS ==" & vbCrLf
For Each d In oParser.Elements
If (d.isSet) Then
s = s & d.Description & " [" & d.Id & "] = '" & d.Value & "'" & vbCrLf
End If
Next
Parse_AAMVA = s
Else
Parse_AAMVA = oParser.Error
End If
End Function

[C#]

// In Visual Studio Project menu Add References to COM:
//    ClearImageDLID Reader
//    ClearImage COM Server

using ClearImage;
using ClearImageDLID;
// ...

static System.Threading.Mutex mut =  new System.Threading.Mutex();    // Prevents reentrancy
private string Read_2D(string sFile)
    {
    try    {
        mut.WaitOne();
             //  Create Reader
        ClearImageDLID.Reader oReader = new  ClearImageDLID.Reader();
            //  Open image from file
        oReader.Image.Open (sFile, 1);
            //  Find barcodes
        CiBarcode Bc = oReader.Read2D();
            // Process Results
        if (Bc != null) return Parse_AAMVA(Bc.Text);
        else            return "";
        }
    catch (Exception ex) {
        ShowError (ex); return "";}
    finally    {
        mut.ReleaseMutex();
        GC.Collect();}
    }

private string Parse_AAMVA(string text)
    {
    try    {
            //  Create Parser
        ClearImageDLID.ParserAAMVA oParser = new ClearImageDLID.ParserAAMVA();
            // Do Parsing
        if (oParser.Parse(ref text))
            {
            string s = "";
                //  Display Results
            s = s + "FileType = " + oParser.FileType + Environment.NewLine;
            s = s + "Issuer Identification Number = " + oParser.Issuer + Environment.NewLine;
            s = s + "AAMVA Ver = " + oParser.AamvaVer + Environment.NewLine;
            s = s + "Jurisdiction Ver = " + oParser.JurisdictionVer + Environment.NewLine;
            s = s + "Number of Entries = " + oParser.NumberOfEntries + Environment.NewLine;

            s = s + " == ELEMENTS ==" + Environment.NewLine;
            foreach (ClearImageDLID.Element d in oParser.Elements)
                {
                if (d.isSet)
                    s = s + d.Description + " [" + d.Id + "] = <" + d.Value + ">" + Environment.NewLine;
                }
            return s;
            }
        else
            return oParser.Error;
        }
    catch (Exception ex) {
        ShowError(ex); return "";}
    }


%%localitemtitle%%

AamvaVer Property

Description

AAMVA Version Number

Property type

An Integer value.

Syntax

object.AamvaVer

The AamvaVer Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.


%%localitemtitle%%

Elements Property

Description

List of Element objects

Property type

A Collection object.

Syntax

object.Elements

The Elements Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.

Remarks

Each object in collection is of type Element.

Example

[Visual Basic]

' Iterating through Elements in collection
Dim d As ClearRealId.Element, s As String
For Each d In oParser.Elements
If (d.isSet) Then
s = s & d.Description & " [" & d.Id & "] = '" & d.Value & "'" & vbCrLf
End If
Next


%%localitemtitle%%

Error Property

Description

Parsing Error Information. Empty string if no error

Property type

A String value.

Syntax

object.Error

The Error Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.


%%localitemtitle%%

FileType Property

Description

File Type designator

Property type

A String value.

Syntax

object.FileType

The FileType Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.


%%localitemtitle%%

Issuer Property

Description

Issuer Identification Number (IIN)

Property type

A Long value.

Syntax

object.Issuer

The Issuer Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.


%%localitemtitle%%

JurisdictionVer Property

Description

Jurisdiction Version Number

Property type

An Integer value.

Syntax

object.JurisdictionVer

The JurisdictionVer Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.


%%localitemtitle%%

NumberOfEntries Property

Description

Number of different Subfile types

Property type

An Integer value.

Syntax

object.NumberOfEntries

The NumberOfEntries Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type ParserAAMVA.


%%localitemtitle%%

Reader Object

Members

Methods
Read1D | Read 1D barcode value
Read2D | Read 2D (PDF417) barcode value.

Properties
Ci | Read-write property | ClearImage server
Image | Read-write property | Image containing DL/ID barcodes. Use CiImage methods to open intialize image from file, bitmap, etc.


%%localitemtitle%%

Read1D Method

Description

Read 1D barcode value

Returns

An ICiBarcode object.

Syntax

object.Read1D

The Read1D Method syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Reader.

Example

[Visual Basic]

' In VB6 Project menu Add Reference to:
' ClearImage COM Server
' ClearImageDLID Reader

Public Sub Read_1D(sFile As String)
' Create Reader
Dim oReader As New ClearImageDLID.Reader
' Open image from file
oReader.Image.Open sFile
' Find barcodes
Dim Bc As CiBarcode
Set Bc = oReader.Read1D
' Process Results
If (Not Bc Is Nothing) Then MsgBox Bc.Text
If (Bc Is Nothing) Then MsgBox "NO 1D Barcode"
End Sub

[C#]

// In Visual Studio Project menu Add References to COM:
//    ClearImageDLID Reader
//    ClearImage COM Server

using ClearImage;
using ClearImageDLID;
// ...

static System.Threading.Mutex mut =  new System.Threading.Mutex();    // Prevents reentrancy
private string Read_1D(string sFile)
    {
    try    {
        mut.WaitOne();
             //  Create Reader
        ClearImageDLID.Reader oReader = new  ClearImageDLID.Reader();
            //  Open image from file
        oReader.Image.Open (sFile, 1);
            //  Find barcodes
        CiBarcode Bc = oReader.Read1D();
            // Process Results
        if (Bc != null) return Bc.Text;
        else            return "";
        }
    catch (Exception ex) {
        ShowError(ex); return "";}
    finally    {
        mut.ReleaseMutex();
        GC.Collect();}
    }


%%localitemtitle%%

Read2D Method

Description

Read 2D (PDF417) barcode value.

Returns

An ICiBarcode object.

Syntax

object.Read2D

The Read2D Method syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Reader.

Example

[Visual Basic]

' In VB6 Project menu Add Reference to:
' ClearImage COM Server
' ClearImageDLID Reader

Public Sub Read_2D(sFile As String)
On Error GoTo except
' Create Reader
Dim oReader As New ClearImageDLID.Reader
' Open image from file
oReader.Image.Open sFile
' Find barcodes
Dim Bc As CiBarcode
Set Bc = oReader.Read2D
' Process Results
If (Not Bc Is Nothing) Then MsgBox Parse_AAMVA(Bc.text)
If (Bc Is Nothing) Then MsgBox "NO 2D Barcode"
Exit Sub
except:
MsgBox "ERROR: " & Err.Description
End Sub

Public Function Parse_AAMVA(text As String) As String
' Create Parser
Dim oParser As New ClearImageDLID.ParserAAMVA
' Do Parsing
If (oParser.Parse(text)) Then
Dim s As String
' Display Results
s = s & "FileType = " & oParser.FileType & vbCrLf
s = s & "Issuer Identification Number = " & oParser.Issuer & vbCrLf
s = s & "AAMVA Ver = " & oParser.AamvaVer & vbCrLf
s = s & "Jurisdiction Ver = " & oParser.JurisdictionVer & vbCrLf
s = s & "Number of Entries = " & oParser.NumberOfEntries & vbCrLf

Dim d As ClearImageDLID.Element
s = s & " == ELEMENTS ==" & vbCrLf
For Each d In oParser.Elements
If (d.isSet) Then
s = s & d.Description & " [" & d.Id & "] = '" & d.Value & "'" & vbCrLf
End If
Next
Parse_AAMVA = s
Else
Parse_AAMVA = oParser.Error
End If
End Function

[C#]

// In Visual Studio Project menu Add References to COM:
//    ClearImageDLID Reader
//    ClearImage COM Server

using ClearImage;
using ClearImageDLID;
// ...

static System.Threading.Mutex mut =  new System.Threading.Mutex();    // Prevents reentrancy
private string Read_2D(string sFile)
    {
    try    {
        mut.WaitOne();
             //  Create Reader
        ClearImageDLID.Reader oReader = new  ClearImageDLID.Reader();
            //  Open image from file
        oReader.Image.Open (sFile, 1);
            //  Find barcodes
        CiBarcode Bc = oReader.Read2D();
            // Process Results
        if (Bc != null) return Parse_AAMVA(Bc.Text);
        else            return "";
        }
    catch (Exception ex) {
        ShowError (ex); return "";}
    finally    {
        mut.ReleaseMutex();
        GC.Collect();}
    }

private string Parse_AAMVA(string text)
    {
    try    {
            //  Create Parser
        ClearImageDLID.ParserAAMVA oParser = new ClearImageDLID.ParserAAMVA();
            // Do Parsing
        if (oParser.Parse(ref text))
            {
            string s = "";
                //  Display Results
            s = s + "FileType = " + oParser.FileType + Environment.NewLine;
            s = s + "Issuer Identification Number = " + oParser.Issuer + Environment.NewLine;
            s = s + "AAMVA Ver = " + oParser.AamvaVer + Environment.NewLine;
            s = s + "Jurisdiction Ver = " + oParser.JurisdictionVer + Environment.NewLine;
            s = s + "Number of Entries = " + oParser.NumberOfEntries + Environment.NewLine;

            s = s + " == ELEMENTS ==" + Environment.NewLine;
            foreach (ClearImageDLID.Element d in oParser.Elements)
                {
                if (d.isSet)
                    s = s + d.Description + " [" + d.Id + "] = <" + d.Value + ">" + Environment.NewLine;
                }
            return s;
            }
        else
            return oParser.Error;
        }
    catch (Exception ex) {
        ShowError(ex); return "";}
    }


%%localitemtitle%%

Ci Property

Description

ClearImage server

Property type

An ICiServer object.

Syntax

[Set] object.Ci [= ICiServer]

The Ci Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Reader.
ICiServer | An ICiServer object.


%%localitemtitle%%

Image Property

Description

Image containing DL/ID barcodes. Use CiImage methods to open intialize image from file, bitmap, etc.

Property type

An ICiImage object.

Syntax

[Set] object.Image [= ICiImage]

The Image Property syntax has these parts:

Part | Description
object | An expression evaluating to an object of type Reader.
ICiImage | An ICiImage object.


%%projectgrouptitle%%

ClearImageDLID

Description

ClearImage DLID Reader

Object Model

Reader (Class Module)

Element (Class Module)

ParserAAMVA (Class Module)


%%phrase%%

References

References

FileName Version Size Description