public final class OcrText


Represents a segment of recognized text and its visual mapping in an image.

Summary

Public constructors

Public methods

final @NonNull List<@NonNull Rect>

A list of Rect objects representing the visual bounding boxes of the text.

final @NonNull String

The recognized string content.

Public constructors

OcrText

Added in 1.0.0-alpha19
public OcrText(@NonNull String text, @NonNull List<@NonNull Rect> bounds)

Public methods

getBounds

Added in 1.0.0-alpha19
public final @NonNull List<@NonNull RectgetBounds()

A list of Rect objects representing the visual bounding boxes of the text. The bounds are typically aggregated by line to optimize for rendering and selection.

getText

Added in 1.0.0-alpha19
public final @NonNull String getText()

The recognized string content.