extractMrtdMrzData

Extracts MrtdAccessDataMrz from text that was captured by OCR of a passport page.

It is expected that OCRed text contains many errors. This function does a lot of validation and returns non-null result only if everything checks out.

There are three types of MRTD (Machine-Readable Travel Documents): T1 - T3. T1 and T2 are ID cards and T3 are passports. They are described by ICAO in the following standards:

  • T1: https://www.icao.int/publications/Documents/9303_p5_cons_en.pdf

  • T2: https://www.icao.int/publications/Documents/9303_p6_cons_en.pdf

  • T3: https://www.icao.int/publications/Documents/9303_p4_cons_en.pdf