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 =
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);

Public Method Summary

detectInImage(FirebaseVisionImage image)
Detects labels from supplied image.

Inherited Method Summary

Public Methods

public void close ()


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.