public static final class TextRecognitionResult.TextBlock
- Object
- TextRecognitionResult.TextBlock
One recognized text block with confidence and normalized bounds.
Constructors
public TextBlock(String text, float confidence, VisionRect bounds, String languageTag) | Creates one OCR block. |
Methods
public String getText() | |
public float getConfidence() | |
public VisionRect getBounds() | |
public String getLanguageTag() |
Inherited methods
Constructor details
TextBlock
public TextBlock(String text, float confidence, VisionRect bounds, String languageTag)Creates one OCR block.
Parameters
textString- recognized text
confidencefloat- recognition confidence in 0..1
boundsVisionRect- normalized block bounds
languageTagString- BCP-47 tag, or
null
Method details
getText
public String getText()Returns
recognized block text
getConfidence
public float getConfidence()Returns
recognition confidence in the range 0..1
getBounds
public VisionRect getBounds()Returns
normalized top-left-origin bounds
getLanguageTag
public String getLanguageTag()Returns
BCP-47 language tag, or
null when unavailable