.. _mrz_reading:

===========
MRZ reading
===========

MRZ text filling validity is determined in accordance with ICAO 9303 for machine readable documents. Unlike document reading, it doesn't not require a previous detection of the document.

MRZ reading module provide functions to read the MRZ as the full string, and to decode its field as a dictionary name:value.


Fields names by MRZ Types
=========================

.. include:: MRZ_fields_by_type.rst

Example
=======

The example below demonstrates how to read, check and decode an MRZ from an image.

.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. literalinclude:: /../samples/sample.py
        :language: python
        :start-after: [mrz_reading]
        :end-before: [mrz_reading]
        :dedent: 4

See also
========
- :ref:`id3_document_mrz_reader_class`
- :ref:`id3_document_mrz_reader_read_mrz_class_method`
