Class TextRecognitionResult.TextBlock
java.lang.Object
com.codename1.ai.vision.TextRecognitionResult.TextBlock
- Enclosing class:
TextRecognitionResult
One recognized text block with confidence and normalized bounds.
-
Constructor Summary
ConstructorsConstructorDescriptionTextBlock(String text, float confidence, VisionRect bounds, String languageTag) Creates one OCR block. -
Method Summary
-
Constructor Details
-
TextBlock
Creates one OCR block.- Parameters:
text- recognized textconfidence- recognition confidence in 0..1bounds- normalized block boundslanguageTag- BCP-47 tag, ornull
-
-
Method Details
-
getText
- Returns:
- recognized block text
-
getConfidence
public float getConfidence()- Returns:
- recognition confidence in the range 0..1
-
getBounds
- Returns:
- normalized top-left-origin bounds
-
getLanguageTag
- Returns:
- BCP-47 language tag, or
nullwhen unavailable
-