FirebaseVisionCloudLabelDetector

public class FirebaseVisionCloudLabelDetector extends Object
implements Closeable

Detector for finding FirebaseVisionCloudLabels in a supplied image.

A cloud label detector is created via getVisionCloudLabelDetector(FirebaseVisionCloudDetectorOptions), or getVisionCloudLabelDetector() if you wish to use the default options. For example, the code below creates a label detector with default options.


 FirebaseVisionCloudLabelDetector cloudLabelDetector =
    FirebaseVision.getInstance().getVisionCloudLabelDetector();
To perform label detection in an image, you first need to create an instance of FirebaseVisionImage from a Bitmap, ByteBuffer, etc. See FirebaseVisionImage documentation for more details. For example, the code below creates a FirebaseVisionImage from a Bitmap.
      FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);
Then the code below can detect labels in the supplied FirebaseVisionImage.

 Task<List<FirebaseVisionCloudLabel>> task = cloudLabelDetector.detectInImage(image);
 task.addOnSuccessListener(...).addOnFailureListener(...);
 

Public Method Summary

void
Task<List<FirebaseVisionCloudLabel>>
detectInImage(FirebaseVisionImage image)
Detects labels from supplied image.

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()
abstract void
close()
abstract void
close()

Public Methods

public void close ()

Throws

public Task<List<FirebaseVisionCloudLabel>> detectInImage (FirebaseVisionImage image)

Detects labels from supplied image.

For best efficiency, create a FirebaseVisionImage object using one of the following ways:

All other FirebaseVisionImage factory methods will work as well, but possibly slightly slower.
Returns