MlKitOcrProvider


@ExperimentalPdfApi
class MlKitOcrProvider : OcrProvider


Implementation of OcrProvider using ML Kit's Text Recognition.

Summary

Public constructors

Public functions

open Unit
open suspend OcrResult?

Processes the given image and returns recognized text results.

Public constructors

MlKitOcrProvider

Added in 1.0.0-beta01
MlKitOcrProvider()

Public functions

close

Added in 1.0.0-beta01
open fun close(): Unit

recognizeText

open suspend fun recognizeText(image: Bitmap): OcrResult?

Processes the given image and returns recognized text results.

Parameters
image: Bitmap

The bitmap to process for text recognition.

Returns
OcrResult?

An OcrResult containing the recognized text and its visual mapping, or null if no text was recognized or an error occurred.