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 | getClassificationCategory() Gets the FirebaseVisionObject.Category of the object. |
| 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
public static final int CATEGORY_FOOD
public static final int CATEGORY_HOME_GOOD
public static final int CATEGORY_PLACE
public static final int CATEGORY_PLANT
public static final int CATEGORY_UNKNOWN
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.