Stay organized with collections Save and categorize content based on your preferences.
public final class TextRecognizer extends Detector<TextBlock>

Finds and recognizes text in a supplied Frame.

Build new TextRecognizer instances using TextRecognizer.Builder.

Recognition results are returned by detect(Frame). The OCR algorithm tries to infer the text layout and organizes each paragraph into TextBlock instances. If any text is detected, at least one TextBlock instance will be returned.

Adding the ocr functionality dependency to your project's AndroidManifest.xml will indicate to the installer that it should download the dependency on application install.

Nested Class Summary

class TextRecognizer.Builder TextRecognizer Builder. 

Public Method Summary

detect(Frame frame)
Detects and recognizes text in a image.

Inherited Method Summary

Public Methods

public SparseArray<TextBlock> detect (Frame frame)

Detects and recognizes text in a image. Only supports bitmap and ImageFormat.NV21 for now.

  • mapping of int to TextBlock, where the int domain represents an opaque ID for the text block.

public boolean isOperational ()

public void release ()