FirebaseVisionObject

public class FirebaseVisionObject extends Object

This class is deprecated.
The standalone ML Kit SDK replaces this API. For more information, refer to the migration guide.

Represents a detected object by FirebaseVisionObjectDetector.

Nested Class Summary

@interface FirebaseVisionObject.Category Classification category of detected objects. 

Constant Summary

int CATEGORY_FASHION_GOOD
int CATEGORY_FOOD
int CATEGORY_HOME_GOOD
int CATEGORY_PLACE
int CATEGORY_PLANT
int CATEGORY_UNKNOWN

Public Method Summary

Rect
getBoundingBox()
Gets the axis-aligned bounding rectangle of the detected object.
int
Float
getClassificationConfidence()
Gets the confidence of the on-device object classification.
Integer
getTrackingId()
Gets the tracking ID of the object.

Inherited Method Summary

Constants

public static final int CATEGORY_FASHION_GOOD

Constant Value: 2

public static final int CATEGORY_FOOD

Constant Value: 3

public static final int CATEGORY_HOME_GOOD

Constant Value: 1

public static final int CATEGORY_PLACE

Constant Value: 4

public static final int CATEGORY_PLANT

Constant Value: 5

public static final int CATEGORY_UNKNOWN

Constant Value: 0

Public Methods

public Rect getBoundingBox ()

Gets the axis-aligned bounding rectangle of the detected object.

public int getClassificationCategory ()

Gets the FirebaseVisionObject.Category of the object. If on-device classification is disabled, it returns CATEGORY_UNKNOWN.

public Float getClassificationConfidence ()

Gets the confidence of the on-device object classification. To be valid, the confidence must be in the range [0.0, 1.0]. If the confidence is CATEGORY_UNKNOWN, the call will return null.

public Integer getTrackingId ()

Gets the tracking ID of the object. The ID is a non-negative number in STREAM_MODE and null in SINGLE_IMAGE_MODE.