October 2018
Intermediate to advanced
246 pages
6h 26m
English
For text detection, pass the image object to the detectInImage() method from the detector instance. The following code block is used to do this:
Task<FirebaseVisionText> result = detector.detectInImage(image) .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() { @Override public void onSuccess(FirebaseVisionText firebaseVisionText) { // Task completed successfully // ... } }) .addOnFailureListener( new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { // Task failed with an exception // ... } });
Upon successful identification of text, we can parse the FirebaseVisionText object to process it further, using the following code block:
for (FirebaseVisionText.Block block:
Read now
Unlock full access