FirebaseVisionDocumentText.Block

public static class FirebaseVisionDocumentText.Block extends Object

A logical element on the page. A FirebaseVisionDocumentText.Block could contain multiple FirebaseVisionDocumentText.Paragraphs.

Public Method Summary

Rect
getBoundingBox()
Gets the bounding box for the recognized text.
Float
getConfidence()
Gets confidence of the OCR results for the recognized text.
List<FirebaseVisionDocumentText.Paragraph>
FirebaseVisionDocumentText.RecognizedBreak
getRecognizedBreak()
Gets the recognized break.
List<RecognizedLanguage>
getRecognizedLanguages()
Gets the recognized languages.
String
getText()
Gets the UTF-8 representation of the recognized text.

Inherited Method Summary

Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

Public Methods

public Rect getBoundingBox ()

Gets the bounding box for the recognized text.

public Float getConfidence ()

Gets confidence of the OCR results for the recognized text.

Returns null if no confidence available. Otherwise, its range is [0.0f, 1.0f].

public List<FirebaseVisionDocumentText.Paragraph> getParagraphs ()

Gets the List of FirebaseVisionDocumentText.Paragraphs in the FirebaseVisionDocumentText.Block.

Returns an empty list if no Paragraph is found.

public FirebaseVisionDocumentText.RecognizedBreak getRecognizedBreak ()

Gets the recognized break.

public List<RecognizedLanguage> getRecognizedLanguages ()

Gets the recognized languages.

public String getText ()

Gets the UTF-8 representation of the recognized text.

Returns an empty string if nothing is found.

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Aug 8, 2020

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Feb 7, 2025

The Admin SDK lets you interact with Firebase from your server environment to perform actions like generating and verifying Firebase auth tokens, reading and writing to Realtime Database, and so on.

Updated Jul 29, 2022