mrz_scanner library

Reads the machine readable zone of passports, identity cards and visas in a camera frame or a photo, in pure Dart: the key that opens their chip, without typing it.

An MrzRecognizer reads one image; an MrzScanner reads the frames of a camera until enough of them agree.

import 'package:eid_icao/mrz_scanner.dart';

final scanner = MrzScanner();
final result = scanner.add(MrzImage.luminance(
  width: frame.width,
  height: frame.height,
  bytes: frame.bytes,
));
if (result != null) await IcaoReader(transport).read(access: result.accessKey);

Classes

MrzImage
A grey image: a camera frame, a photo of a document, a crop of either.
MrzReading
A zone read from one image: the text, how sure the reading is, where the zone lies.
MrzRecognizer
Reads the machine readable zone of a passport, an identity card or a visa in an image, without any other library: OCR-B glyphs matched against the cells of the zone, check digits putting near ties right.
MrzScanner
Reads the zone in the frames of a camera until enough of them agree.
MrzScanResult
A zone read and confirmed by several frames: ready to open the chip.

Enums

MrzRotation
How far a frame is turned from upright: the quarter turns, clockwise, that bring its text level.

Typedefs

MrzPoint = ({double x, double y})
A point of an image, in pixels from its top left corner once level.