analyse

suspend fun analyse(frame: F): MrzScanResult

Analyses a single frame and returns the result.

An OCR failure is a MrzScanResult.CaptureError holding CameraError.OcrFailed, an unparseable candidate is a MrzScanResult.Decoded holding the parse failure, and a frame with no MRZ is a MrzScanResult.NoMrzFound; none of these throw. Coroutine cancellation propagates. It calls MrzTextRecognizer.recognize on the caller's coroutine context.

Return

the outcome for this frame.

Parameters

frame

the frame to analyse.