MlKitMrzTextRecognizer
class MlKitMrzTextRecognizer(recognizer: TextRecognizer = TextRecognition.getClient(TextRecognizerOptions.DEFAULT_OPTIONS)) : MrzTextRecognizer<ImageProxy> , AutoCloseable
Recognizes text in CameraX frames with ML Kit Text Recognition (the bundled Latin model).
It reads each ImageProxy and never closes it: the caller closes the frame. Close the recognizer to release the ML Kit client.
A short MRZ-like row next to an exact-width row is read again only after restrictToMrzBand is called; an exact-width second read replaces the first-pass row and marks it with RecognizedLine.secondRead.
Since
0.2.0
Parameters
recognizer
the ML Kit client. The default is the bundled Latin recognizer.
Constructors
Functions
Link copied to clipboard
Runs ML Kit on frame and returns the recognized lines.
Link copied to clipboard
Limits OCR to a horizontal band in the vertical centre of the upright frame.