ObjectDetectorOptions
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Constant Summary
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()
|
Fields
public static final
ObjectDetectorOptions DEFAULT_OPTIONS
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 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eObjectDetectorOptions\u003c/code\u003e provides configurations for the \u003ccode\u003eObjectDetector\u003c/code\u003e with a bundled classifier model.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDetectedObject.Label\u003c/code\u003e will contain a category from \u003ccode\u003ePredefinedCategory\u003c/code\u003e when using these options.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDEFAULT_OPTIONS\u003c/code\u003e offers a pre-built configuration equivalent to using a basic \u003ccode\u003eObjectDetectorOptions.Builder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits detection modes (single image or stream) from \u003ccode\u003eObjectDetectorOptionsBase\u003c/code\u003e.\u003c/p\u003e\n"]]],["`ObjectDetectorOptions` configures an `ObjectDetector` using a bundled model. It categorizes detected objects based on `PredefinedCategory`. A `Builder` class is used to create options. It supports `SINGLE_IMAGE_MODE` for independent image detection and `STREAM_MODE` for video/camera streams. `DEFAULT_OPTIONS`, equivalent to using the builder with no arguments, is a static field to access the default options. It also provides method such as equals() and hashCode().\n"],null,["public class **ObjectDetectorOptions** extends [ObjectDetectorOptionsBase](/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase) \nOptions for [ObjectDetector](/android/reference/com/google/mlkit/vision/objects/ObjectDetector)\nwith a predefined and bundled classifier model.\n\nWhen using [ObjectDetectorOptions](/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions)\nto create an [ObjectDetector](/android/reference/com/google/mlkit/vision/objects/ObjectDetector),\neach [DetectedObject.Label](/android/reference/com/google/mlkit/vision/objects/DetectedObject.Label)\nwill have one of the categories in [PredefinedCategory](/android/reference/com/google/mlkit/vision/objects/defaults/PredefinedCategory)\nas its text field. \n\nNested Class Summary\n\n|-------|---|---|------------------------------------------------------------------------------------------------------------------------|\n| class | [ObjectDetectorOptions.Builder](/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions.Builder) || Builder of [ObjectDetectorOptions](/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions). |\n\nInherited Constant Summary \nFrom class [com.google.mlkit.vision.objects.ObjectDetectorOptionsBase](/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase) \n\n|-----|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|\n| int | [SINGLE_IMAGE_MODE](/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#SINGLE_IMAGE_MODE) | It is designed for single images where the detection of each image is independent. |\n| int | [STREAM_MODE](/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#STREAM_MODE) | It is designed for streaming frames from video or camera. |\n\nField Summary\n\n|--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|\n| public static final [ObjectDetectorOptions](/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions) | [DEFAULT_OPTIONS](/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions#DEFAULT_OPTIONS) | The default [ObjectDetectorOptions](/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions). |\n\nInherited Method Summary \nFrom class [com.google.mlkit.vision.objects.ObjectDetectorOptionsBase](/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase) \n\n|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) o) Indicates whether some other object is \"equal to\" this one. |\n| int | [hashCode](/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#hashCode())() Returns a hash code value for the object. |\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\nFields \n\npublic static final ObjectDetectorOptions **DEFAULT_OPTIONS** \nThe default [ObjectDetectorOptions](/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions).\n\nThis is equivalent to `new ObjectDetectorOptions.Builder().build()`."]]