Skip to main content

Process MRZ

Processes Machine Readable Zone (MRZ) from passport or ID card images using ABBYY Cloud OCR service.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.

Inputs

  • Image Path - Path to the image file containing the MRZ data (passport, visa, or ID card).

Options

This node has no configurable options. It automatically detects and processes MRZ data.

Outputs

  • Task - ABBYY task object containing extracted MRZ data with structured personal information.

How It Works

The Process MRZ node extracts and validates Machine Readable Zone data from travel and identity documents. When executed, the node:

  1. Reads the document image file
  2. Detects the MRZ area automatically
  3. Uploads the image to ABBYY Cloud
  4. Recognizes MRZ characters using specialized fonts
  5. Validates check digits and format
  6. Extracts structured personal information
  7. Returns a task object with parsed MRZ fields

Requirements

  • Valid ABBYY Cloud credentials
  • Clear image showing the complete MRZ area
  • Standard passport, visa, or ID card with MRZ

Error Handling

The node will return specific errors in the following cases:

  • Robomotion.ABBYYCloud.ErrImagePath - Image path is invalid or file not found
  • Robomotion.ABBYYCloud.ErrImageData - Cannot read image file
  • MRZ may not be found if image quality is poor or MRZ is incomplete

Usage Example

Scenario: Extract passport information from MRZ

1. Process MRZ node:
- Image Path: "C:/passports/passport_scan.jpg"

2. Wait Task node:
- Task: {{ $.task }}
- Timeout: 30 seconds

3. Extract MRZ data:
- Document Type
- Country Code
- Surname
- Given Names
- Passport Number
- Nationality
- Date of Birth
- Sex
- Expiration Date
- Personal Number

Common Use Cases

  • Airport Check-in - Automate passenger data entry from passports
  • Hotel Registration - Extract guest information from ID documents
  • KYC Verification - Identity verification for banking and finance
  • Border Control - Fast processing of travel documents
  • Visa Processing - Extract applicant data from passport MRZ
  • Document Verification - Validate passport and ID authenticity
  • User Onboarding - Quick customer registration using ID documents
  • Access Control - Verify identity for secure facilities

MRZ Document Types

Passport (TD-3)

  • Two lines of 44 characters each
  • Contains full personal information
  • International standard format

ID Card (TD-1)

  • Three lines of 30 characters each
  • Used for national ID cards
  • Compact format

Visa (TD-2)

  • Two lines of 36 characters each
  • Machine readable visa stickers
  • Standard visa format

Extracted Information

The node extracts the following fields from MRZ:

  • Document Information:
    • Document type (P=Passport, I=ID, V=Visa)
    • Issuing country code (ISO 3166-1 alpha-3)
    • Document number
    • Optional data/personal number
  • Personal Information:
    • Surname (last name)
    • Given names (first and middle names)
    • Nationality
    • Date of birth
    • Sex/Gender (M/F)
  • Validity Information:
    • Date of issue (if present)
    • Date of expiry
    • Check digits for validation

Tips and Best Practices

  • Image Capture:
    • Ensure entire MRZ is visible and in focus
    • Use good lighting without glare or shadows
    • Capture straight-on (avoid angles or perspective)
    • MRZ should be horizontal and readable
    • Use at least 300 DPI for scanning
  • Image Quality:
    • MRZ text must be clear and unobscured
    • Avoid damaged or worn documents
    • Clean document before scanning/photographing
    • Ensure adequate contrast
  • Document Positioning:
    • MRZ is typically at bottom of passport/ID
    • Include some margin above and below MRZ
    • Ensure no fingers or objects block MRZ
    • Keep document flat (not curved or folded)
  • Recognition Accuracy:
    • MRZ uses specialized OCR-B font
    • Check digits are automatically validated
    • Invalid check digits indicate recognition errors
    • Verify critical fields manually if needed
  • Data Validation:
    • Compare extracted data with visual inspection
    • Validate date formats and ranges
    • Check country codes against valid list
    • Verify check digit calculations
    • Cross-reference document number format
  • Security Considerations:
    • Handle passport/ID images securely
    • Encrypt stored images and data
    • Follow data protection regulations (GDPR, etc.)
    • Implement access controls
    • Secure disposal of temporary files
  • Error Handling:
    • Retry with better image if MRZ not found
    • Check for complete MRZ visibility
    • Verify document is MRZ-enabled
    • Some older documents may lack MRZ
  • Performance:
    • MRZ processing is typically fast (2-5 seconds)
    • No language selection needed (MRZ is standardized)
    • Batch processing supported for multiple documents
  • Integration:
    • Parse MRZ output for individual fields
    • Validate against government databases if available
    • Auto-fill forms with extracted data
    • Flag suspicious or invalid documents
  • Common Issues:
    • Worn or damaged MRZ may not read correctly
    • Poor lighting causes recognition errors
    • Curved documents (open passport) affect accuracy
    • Dirt or stamps on MRZ reduce reliability