# ObjectDetectorOptionsBase

public abstract class **ObjectDetectorOptionsBase** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  

|---|---|---|
| Known Direct Subclasses [CustomObjectDetectorOptions](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/custom/CustomObjectDetectorOptions), [ObjectDetectorOptions](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions) |---|---| | [CustomObjectDetectorOptions](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/custom/CustomObjectDetectorOptions) | Options for `https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetector` with custom classifier models. | | [ObjectDetectorOptions](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions) | Options for `https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetector` with a predefined and bundled classifier model. | |||

Base options for `https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetector`.

Concrete child classes include `https://developers.google.com/android/reference/com/google/mlkit/vision/objects/defaults/ObjectDetectorOptions`
and `https://developers.google.com/android/reference/com/google/mlkit/vision/objects/custom/CustomObjectDetectorOptions`.

### Nested Class Summary

|---|---|---|---|
| @interface | [ObjectDetectorOptionsBase.DetectorMode](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase.DetectorMode) || The detector mode which indicates whether detection is for single image or for streaming. |

### Constant Summary

|---|---|---|
| int | [SINGLE_IMAGE_MODE](https://developers.google.com/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. |
| int | [STREAM_MODE](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#STREAM_MODE) | It is designed for streaming frames from video or camera. |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) o) Indicates whether some other object is "equal to" this one. |
| int | [hashCode](https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#hashCode())() Returns a hash code value for the object. |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Constants

#### public static final int
**SINGLE_IMAGE_MODE**

It is designed for single images where the detection of each image is independent.
In this mode, the detector would return detection results slower than `https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#STREAM_MODE`.
Constant Value: 2

#### public static final int
**STREAM_MODE**

It is designed for streaming frames from video or camera. In this mode, the detector
would return the detection results faster than `https://developers.google.com/android/reference/com/google/mlkit/vision/objects/ObjectDetectorOptionsBase#SINGLE_IMAGE_MODE`, since it leverages the detection results from previous
images. Therefore, it may not return results for a new object in the first few frames
after a new object appears in the images, since there is no previous result about this
object to help.

Note that if the time-interval between two consecutive frames is too large, say
several hundred milliseconds, the previous detected objects would be lost and all
objects would be treated as new objects.
Constant Value: 1

## Public Methods

#### public boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) o)

Indicates whether some other object is "equal to" this one.

#### public int **hashCode** ()

Returns a hash code value for the object.