FirebaseVisionObject
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
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()
|
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 ()
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
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-08-14 UTC.
[null,null,["Last updated 2020-08-14 UTC."],[],[],null,["# FirebaseVisionObject\n\npublic class **FirebaseVisionObject** extends [Object](//developer.android.com/reference/java/lang/Object.html) \n**This class is deprecated.** \n\nThe standalone ML Kit SDK replaces this API. For more information, refer to the [migration guide](//developers.google.com/ml-kit/migration).\n\nRepresents a detected object by [FirebaseVisionObjectDetector](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObjectDetector). \n\n### Nested Class Summary\n\n|------------|---|---|----------------------------------------------|\n| @interface | [FirebaseVisionObject.Category](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject.Category) || Classification category of detected objects. |\n\n### Constant Summary\n\n|-----|-----------------------------------------------------------------------------------------------------------------------------------|---|\n| int | [CATEGORY_FASHION_GOOD](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_FASHION_GOOD) | |\n| int | [CATEGORY_FOOD](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_FOOD) | |\n| int | [CATEGORY_HOME_GOOD](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_HOME_GOOD) | |\n| int | [CATEGORY_PLACE](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_PLACE) | |\n| int | [CATEGORY_PLANT](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_PLANT) | |\n| int | [CATEGORY_UNKNOWN](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_UNKNOWN) | |\n\n### Public Method Summary\n\n|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Rect](//developer.android.com/reference/android/graphics/Rect.html) | [getBoundingBox](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#getBoundingBox())() Gets the axis-aligned bounding rectangle of the detected object. |\n| int | [getClassificationCategory](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#getClassificationCategory())() Gets the [FirebaseVisionObject.Category](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject.Category) of the object. |\n| [Float](//developer.android.com/reference/java/lang/Float.html) | [getClassificationConfidence](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#getClassificationConfidence())() Gets the confidence of the on-device object classification. |\n| [Integer](//developer.android.com/reference/java/lang/Integer.html) | [getTrackingId](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#getTrackingId())() Gets the tracking ID of the object. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**CATEGORY_FASHION_GOOD**\n\nConstant Value: 2 \n\n#### public static final int\n**CATEGORY_FOOD**\n\nConstant Value: 3 \n\n#### public static final int\n**CATEGORY_HOME_GOOD**\n\nConstant Value: 1 \n\n#### public static final int\n**CATEGORY_PLACE**\n\nConstant Value: 4 \n\n#### public static final int\n**CATEGORY_PLANT**\n\nConstant Value: 5 \n\n#### public static final int\n**CATEGORY_UNKNOWN**\n\nConstant Value: 0\n\nPublic Methods\n--------------\n\n#### public [Rect](//developer.android.com/reference/android/graphics/Rect.html) **getBoundingBox** ()\n\nGets the axis-aligned bounding rectangle of the detected object. \n\n#### public int **getClassificationCategory** ()\n\nGets the [FirebaseVisionObject.Category](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject.Category) of the object. If on-device classification is\ndisabled, it returns [CATEGORY_UNKNOWN](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_UNKNOWN). \n\n#### public [Float](//developer.android.com/reference/java/lang/Float.html) **getClassificationConfidence** ()\n\nGets the confidence of the on-device object classification. To be valid, the\nconfidence must be in the range \\[0.0, 1.0\\]. If the confidence is [CATEGORY_UNKNOWN](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObject#CATEGORY_UNKNOWN), the call will return `null`. \n\n#### public [Integer](//developer.android.com/reference/java/lang/Integer.html) **getTrackingId** ()\n\nGets the tracking ID of the object. The ID is a non-negative number in\n[STREAM_MODE](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObjectDetectorOptions#STREAM_MODE) and `null` in [SINGLE_IMAGE_MODE](/docs/reference/android/com/google/firebase/ml/vision/objects/FirebaseVisionObjectDetectorOptions#SINGLE_IMAGE_MODE)."]]