Business · Product · Technology · AI

Use MRZ structure checks to support an identity review

A Movo-X native case tracing selected TD3/TD1 fixtures, checksum arithmetic, OCR normalization, date representation and advisory field grades before identity review.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: a readable identity line still needs interpretation

A camera workflow can produce text that resembles a machine-readable document zone. The application then has to select candidate lines, recover selected OCR confusions, read fields and show a useful review state. The resulting structured text should remain distinct from an authenticated document or an accepted person identity.

Seven existing Android JVM cases and five portable Swift cases passed against selected Movo-X MRZ logic using synthetic lines and specimen-derived values. They exercise selected TD3 and TD1 paths, checksum decisions and review grades. No physical document, camera, chip or registry was involved. This chapter follows the text-processing boundary.

Use the standard as context for a precisely scoped implementation

ICAO Doc 9303 Part 3, section 4.9, describes an MRZ check digit calculated with repeated weights seven, three and one and a modulus-ten result. Section 4.8 describes the six-character year/month/day date representation. Those are useful primary references for reviewing the selected arithmetic and representation.

The application tests check several known synthetic checksum results and refusal of an unsupported character. They do not constitute a complete standards conformance suite. Form-factor rules, optional/unknown fields, issuer variations, transliteration and physical reading conditions need their own acceptance. The linked official publication provides the specification context; the pinned source and selected fixtures establish what was actually exercised here.

Keep OCR recovery local to the selected field interpretation

The selected Android noise case exercises filler normalization and letter/digit substitutions in numeric and alphabetic contexts. The corresponding Swift case checks recovery of selected noisy lines while retaining low confidence when a selected check digit is wrong. These cases make the normalization policy observable rather than treating all OCR output as literal verified text.

Normalization can be useful and still change the original character sequence. Accept ambiguous letters, unsupported characters and several plausible candidates separately. The tests feed strings directly into the parser, so they do not measure OCR accuracy, document lighting, camera sharpness or recognition rates across devices. Preserve the distinction between text recovery and image-capture acceptance.

Exercise selected line shapes without claiming every form factor

The selected fixtures cover a two-line TD3 example and a three-line TD1 example. An Android plain-text case returns no MRZ candidate; a Swift plain-passport-text case leaves selected fields absent when no MRZ is found. Another Android case checks that a selected passport extraction receives the parsed machine-readable fields.

The inspected finder also performs candidate cleaning and bounded fitting before parsing. That is a recovery strategy, not a claim that every accepted candidate exactly matches the original printed zone. Add malformed lengths, multiple candidates, missing lines and unsupported formats to acceptance before describing the implementation as a general travel-document validator.

Read checksum flags according to their actual meaning

The selected bad-checksum fixtures retain parsed information with a lower grade for the disputed field rather than treating every output as equally reliable. Individual field checks and the selected composite check have different inputs. A successful arithmetic check establishes consistency with those inputs in the fixture.

It does not establish authenticity, current expiry validity or ownership by the person holding the phone. The synthetic example can have a structurally consistent expiry field whose date is already past. The selected source’s expiryDateValid flag reflects its check-digit result; accepting an unexpired document is a separate product/authority decision. Do not infer that decision from a variable name.

Treat a two-digit year as representation that needs a policy

The inspected native date code resolves a birth year using a selected nonfuture-century heuristic and parses the resulting calendar date. Expiry handling uses its own selected year construction. These are application interpretation choices layered on the represented date fields, not evidence of the person’s actual age or the issuing authority’s intent.

The selected specimen fixtures check particular parsed dates. They do not cover every century boundary, unknown date, leap-day or issuer-specific variation. Keep the source date, interpreted candidate and human review meaning clear in acceptance. A checksum can remain consistent even when an application needs more context to interpret the century.

Make confidence grades advisory rather than probabilistic

The selected conversion maps field/composite check results to high, medium or low labels. It uses a composite-derived policy for some fields, including the name. The native specimen-derived tests use different synthetic given names while retaining the relevant data-line checks. That distinction matters because the selected checksum is not a cryptographic binding of the person’s name.

These enum labels are product review hints, not calibrated percentages of identity correctness. The fixtures do not measure false acceptance or false rejection on a real corpus. Reviewers should be able to inspect the candidate values and disagreements without treating a high label as government verification or proof that the whole document is genuine.

Keep capture, submission and clinic decisions as separate stages

The text parser returns fields and selected grades. A surrounding capture/review flow must still establish usable images, user review, appropriate submission context and an authoritative decision. None of the twelve scoped cases sends a real submission or exercises that complete chain.

A practical acceptance package adds generated image variations, actual OCR, multi-candidate review, edited fields, current server validation and the intended human decision process. Any electronic-document authentication or issuing-authority verification needs separate evidence. Preserve the parser cases as one layer of that package rather than letting them stand in for all identity assurance.

A structured-reading engineering handover

Retain the twelve scoped cases, source hashes and selected official specification sections. Extend the fixtures around malformed/noisy candidates, date interpretation and confidence policy, then validate the installed capture/review workflow with controlled data. Use metrics only when a defined corpus and evaluation method support them.

For a CTO, the architecture is inspectable: text becomes candidate fields, structural checks contribute review hints and later stages decide what those hints permit. The selected evidence makes that first transformation concrete. It supports a reviewable implementation without certifying all document types, physical reading quality or an actual person’s identity.

Compare the reviewed boundaries

MRZ parsing contributes one layer of identity evidence

On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.

BoundarySelected evidenceSeparate acceptance
ArithmeticKnown checksum and invalid-character fixturesComplete form-factor conformance
Text recoverySelected TD3/TD1 and noisy-line casesActual OCR and ambiguous candidates
Date/grade meaningSelected parsed fields and advisory policiesCentury, expiry and corpus evaluation
Identity authorityNo actual review/authentication in this batchPhysical/electronic document and responsible decision

Illustrative control flow

Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.

candidate = recover_selected_mrz_text(lines)
parsed = parse_supported_candidate(candidate)
checks = compute_selected_field_and_composite_checks(parsed)
review_fields = attach_advisory_grades(parsed, checks)
# Structural consistency contributes to review; it is not identity authentication.

Additional implementation references

These provider references explain current implementation context. Historical Movo-X observations remain tied to the source records described above.

About this engineering series

Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.

Explore the Movo-X engineering series → · Related implementation experience →

Discuss a similar engineering problem

Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.

Discuss your project on WhatsApp ↗
WhatsApp Omer about this project ↗