OcrProvider


interface OcrProvider : Closeable


Interface for processing images to recognize text.

Implementations should handle the complexity of OCR processing and return a structured OcrResult that allows for spatial queries.

Summary

Public functions

Unit
suspend OcrResult?

Processes the given image and returns recognized text results.

Public functions

close

Added in 1.0.0-alpha19
fun close(): Unit

recognizeText

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.