CameraXMrzScanner
constructor(appContext: Context, lifecycleOwner: LifecycleOwner, recognizer: MrzTextRecognizer<ImageProxy> = MlKitMrzTextRecognizer(), mode: ParsingMode = ParsingMode.STRICT, telemetry: TelemetrySink = TelemetrySinkRegistry.current, cameraSelector: CameraSelector = CameraSelector.DEFAULT_BACK_CAMERA)
Parameters
appContext
an application Context, used to look up the camera provider. Pass context.applicationContext.
lifecycleOwner
the lifecycle the camera session is bound to. CameraX also starts and stops the camera as this lifecycle moves.
recognizer
the OCR engine. The default is MlKitMrzTextRecognizer. The scanner closes a recognizer that is AutoCloseable when it is closed.
mode
how tolerant candidate extraction is of OCR formatting noise. The default is ParsingMode.STRICT.
telemetry
where per-frame CameraFrameEvents go. The default is the registered sink (TelemetrySinkRegistry.current), or NoOpTelemetrySink when none is registered.
cameraSelector
which lens to use. The default is the back camera.