References
Researchs
-
[20.03] Machine-Readable Zones Detection in Images Captured by Mobile Devices’ Cameras
- This paper proposes a machine-readable zone (MRZ) detection method based on connected component arrangement. By analyzing the distribution of black connected components’ centers, the algorithm determines the document orientation, achieving rotation invariance. The algorithm searches for paths that match MRZ features, clusters them, and selects the most consistent cluster, using a bounding box to enclose the result. Tests show that this method outperforms existing techniques with low computational complexity, making it suitable for real-time execution on mobile devices.
-
[20.09] MRZ Code Extraction from Visa and Passport Documents Using Convolutional Neural Network
-
This paper introduces a convolutional neural network (CNN)-based model to successfully extract MRZ information from passport images, regardless of orientation or size. Traditional computer vision methods like Optical Character Recognition (OCR) struggle to accurately extract MRZ information from passports, but this model overcomes that issue. On a dataset of passports and visas, the model achieved a 100% MRZ detection rate and a character recognition Macro-F1 score of 98.36%, demonstrating its excellent performance in document authentication.
-
-
[22.12] Hough Encoder for Machine Readable Zone Localization
-
This paper presents a method combining neural networks with image processing, focusing on lightweight and high-precision MRZ localization. The network processes input images to generate heatmaps of MRZ characters, using connected component analysis to group characters into lines and further evaluate the MRZ’s bounding box. A lightweight version of the Hough encoder is employed, optimized for handling projection-distorted images. The proposed network is 100 times smaller than typical autoencoders and performs well on open synthetic datasets, with fewer parameters than common Unet-based solutions.
-
-
[23.06] MobileMRZNet: Efficient and Lightweight MRZ Detection for Mobile Devices
-
This paper introduces MobileMRZNet, a fast and lightweight MRZ detection method based on the BlazeFace model, specifically designed for mobile GPUs. It achieves fast and accurate MRZ region detection. The model was trained on a dataset comprising real and simulated Turkish ID cards, showing excellent generalization ability. During testing, the model achieved around 81% IoU accuracy and 100% character recognition accuracy within three frames. The model is approximately 400 KB in size and runs in under 10 milliseconds on mobile devices, offering speed, lightness, and robustness compared to existing MRZ detection methods.
-
ICAO 9303
- Part 1: Introduction
- Part 2: Specifications for the Security of the Design, Manufacture and Issuance of MRTDs
- Part 3: Specifications Common to all MRTDs
- Part 4: Specifications for Machine Readable Passports (MRPs) and other TD3 Size MRTDs
- Part 5: Specifications for TD1 Size Machine Readable Official Travel Documents (MROTDs)
- Part 6: Specifications for TD2 Size Machine Readable Official Travel Documents (MROTDs)
- Part 7: Machine Readable Visas
- Part 8: Emergency Travel Documents
- Part 9: Deployment of Biometric Identification and Electronic Storage of Data in MRTDs
- Part 10: Logical Data Structure (LDS) for Storage of Biometrics and Other Data in the Contactless Integrated Circuit (IC)
- Part 11: Security Mechanisms for MRTDs
- Part 12: Public Key Infrastructure for MRTDs
- Part 13: Visible Digital Seals
Check Digit
The Machine-Readable Zone (MRZ) is a key part of passports, visas, and other documents, allowing machines to quickly retrieve essential information. To ensure the accuracy and integrity of the data in the MRZ, a check digit is often included. The check digit is a verification mechanism based on numbers and letters that helps detect errors during data input or reading. While the check digit calculation may seem complex, the basic principles can be broken down into a series of regular steps.
Steps for Calculating the Check Digit
-
Character-to-Number Conversion The first step in calculating the check digit is converting the MRZ characters into numerical values. Different characters are mapped to specific values as follows:
- Numbers (0-9): The value is the number itself. For example,
0
corresponds to the value0
, and9
corresponds to the value9
. - Letters (A-Z): Letters are mapped to values based on their position in the alphabet. For example,
A
is converted to10
,B
to11
, and so on, up toZ
, which is35
. - Special Symbols: In the MRZ, the
<
symbol is commonly used as a placeholder and is assigned the value0
.
- Numbers (0-9): The value is the number itself. For example,
-
Applying Weights During the check digit calculation, each character’s numeric value is multiplied by a predetermined weight. The weights follow a fixed repeating cycle:
- The first character is multiplied by
7
. - The second character is multiplied by
3
. - The third character is multiplied by
1
. - The cycle then repeats for subsequent characters (i.e., 7, 3, 1, 7, 3, 1, ...).
This weighted pattern ensures that each character's importance is varied, helping prevent simple errors from going undetected.
- The first character is multiplied by
-
Summing the Products After multiplying each character's value by its corresponding weight, sum all the resulting products to get a total value.
-
Modulo Operation Finally, take the sum and calculate the modulo 10 (i.e., divide by 10 and take the remainder). This remainder is the check digit. If the remainder is
0
, the check digit is0
; if the remainder is between1
and9
, that is the check digit.
Example of Check Digit Calculation
Let's go through a concrete example.
Assume the following MRZ string: 123ABC<
.
-
Convert Characters to Numbers:
1
→ 12
→ 23
→ 3A
→ 10B
→ 11C
→ 12<
→ 0
-
Apply Weights:
- 1st character
1
: 1 × 7 = 7 - 2nd character
2
: 2 × 3 = 6 - 3rd character
3
: 3 × 1 = 3 - 4th character
A
: 10 × 7 = 70 - 5th character
B
: 11 × 3 = 33 - 6th character
C
: 12 × 1 = 12 - 7th character
<
: 0 × 7 = 0
- 1st character
-
Sum the Products:
- 7 + 6 + 3 + 70 + 33 + 12 + 0 = 131
-
Modulo 10:
- 131 % 10 = 1
Therefore, the check digit is
1
.
Check digits are designed to help detect errors during data input. In the MRZ of passports, visas, and other documents, several critical fields, such as the passport number, birth date, and expiration date, usually come with check digits. Each of these key fields is followed by a check digit so that when the document is read by a machine, the system can verify the data’s accuracy by recalculating the check digit. If the check digit doesn’t match, this indicates a potential reading error or data tampering.