SelfieSegmenterOptions
Stay organized with collections
Save and categorize content based on your preferences.
Constant Summary
int |
SINGLE_IMAGE_MODE
|
This mode is designed for single images that are
not related. |
int |
STREAM_MODE
|
This mode is designed for streaming frames from
video or camera. |
Public Method Summary
boolean |
equals( Object o)
Indicates whether some other object is "equal to" this one.
|
int |
hashCode()
Returns a hash code value for the object.
|
String
|
|
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
SINGLE_IMAGE_MODE
This mode is designed for single images that are not related. In this mode, the
detector will process each image independently, with no smoothing over frames.
Constant Value: 2
public static final int
STREAM_MODE
This mode is designed for streaming frames from video or camera. In this mode, the
detector will leverage results from previous images to return smoother segmentation
results.
Constant Value: 1
Fields
public static final
SelfieSegmenterOptions DEFAULT_OPTIONS
Public Methods
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
public int hashCode ()
Returns a hash code value for the object.
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.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eSelfieSegmenterOptions\u003c/code\u003e provides configuration settings for the \u003ccode\u003eSegmenter\u003c/code\u003e used for selfie segmentation in images or video streams.\u003c/p\u003e\n"],["\u003cp\u003eTwo detector modes are available: \u003ccode\u003eSINGLE_IMAGE_MODE\u003c/code\u003e for individual images and \u003ccode\u003eSTREAM_MODE\u003c/code\u003e for continuous video frames.\u003c/p\u003e\n"],["\u003cp\u003eDefault options can be used with \u003ccode\u003eDEFAULT_OPTIONS\u003c/code\u003e, equivalent to creating an options object with a builder and no specific settings.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes standard methods like \u003ccode\u003eequals\u003c/code\u003e, \u003ccode\u003ehashCode\u003c/code\u003e, and \u003ccode\u003etoString\u003c/code\u003e for object comparison and representation.\u003c/p\u003e\n"]]],[],null,["# SelfieSegmenterOptions\n\npublic class **SelfieSegmenterOptions** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nOptions for [Segmenter](/android/reference/com/google/mlkit/vision/segmentation/Segmenter). \n\n### Nested Class Summary\n\n|------------|---|---|------------------------------------------------------------------------------------------------------------------------------|\n| class | [SelfieSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions.Builder) || Builder for [SelfieSegmenterOptions](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions). |\n| @interface | [SelfieSegmenterOptions.DetectorMode](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions.DetectorMode) || The detector mode which indicates whether it is for single image or for streaming. |\n\n### Constant Summary\n\n|-----|------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n| int | [SINGLE_IMAGE_MODE](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions#SINGLE_IMAGE_MODE) | This mode is designed for single images that are not related. |\n| int | [STREAM_MODE](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions#STREAM_MODE) | This mode is designed for streaming frames from video or camera. |\n\n### Field Summary\n\n|-------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|\n| public static final [SelfieSegmenterOptions](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions) | [DEFAULT_OPTIONS](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions#DEFAULT_OPTIONS) | The default [SelfieSegmenterOptions](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions). |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions#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/segmentation/selfie/SelfieSegmenterOptions#hashCode())() Returns a hash code value for the object. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions#toString())() |\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**SINGLE_IMAGE_MODE**\n\nThis mode is designed for single images that are not related. In this mode, the\ndetector will process each image independently, with no smoothing over frames. \nConstant Value: 2 \n\n#### public static final int\n**STREAM_MODE**\n\nThis mode is designed for streaming frames from video or camera. In this mode, the\ndetector will leverage results from previous images to return smoother segmentation\nresults. \nConstant Value: 1\n\nFields\n------\n\n#### public static final SelfieSegmenterOptions **DEFAULT_OPTIONS**\n\nThe default [SelfieSegmenterOptions](/android/reference/com/google/mlkit/vision/segmentation/selfie/SelfieSegmenterOptions).\n\nThis is equivalent to `new SelfieSegmenterOptions.Builder().build()`.\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) o)\n\nIndicates whether some other object is \"equal to\" this one. \n\n#### public int **hashCode** ()\n\nReturns a hash code value for the object. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()"]]