SubjectSegmenterOptions.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor 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()
|
Public Methods
Returns
- this object, for chaining method calls
Returns
- this object, for chaining method calls
Returns
- this object, for chaining method calls
Sets the custom Executor
to use. If no Executor
is set, an internal background thread pool will be used.
Most clients should not need to call this method.
Returns
- this object, for chaining method calls
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\u003eSubjectSegmenterOptions.Builder\u003c/code\u003e is used to configure options for subject segmentation.\u003c/p\u003e\n"],["\u003cp\u003eIt allows enabling foreground bitmap, foreground confidence mask, and multiple subjects in the segmentation results.\u003c/p\u003e\n"],["\u003cp\u003eA custom \u003ccode\u003eExecutor\u003c/code\u003e can be set for processing, otherwise, an internal thread pool is used.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method creates a \u003ccode\u003eSubjectSegmenterOptions\u003c/code\u003e instance based on the builder's configurations.\u003c/p\u003e\n"]]],[],null,["public static class **SubjectSegmenterOptions.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nBuilder class for [SubjectSegmenterOptions](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions). \n\nPublic Constructor Summary\n\n|---|------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder#Builder())() |\n\nPublic Method Summary\n\n|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [SubjectSegmenterOptions](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions) | [build](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder#build())() |\n| [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) | [enableForegroundBitmap](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder#enableForegroundBitmap())() Enables foreground bitmap in [SubjectSegmentationResult](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmentationResult). |\n| [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) | [enableForegroundConfidenceMask](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder#enableForegroundConfidenceMask())() Enables foreground confidence mask in [SubjectSegmentationResult](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmentationResult). |\n| [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) | [enableMultipleSubjects](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder#enableMultipleSubjects(com.google.mlkit.vision.segmentation.subject.SubjectSegmenterOptions.SubjectResultOptions))([SubjectSegmenterOptions.SubjectResultOptions](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.SubjectResultOptions) options) Enables multiple subjects in [SubjectSegmentationResult](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmentationResult). |\n| [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) | [setExecutor](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder#setExecutor(java.util.concurrent.Executor))([Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) executor) Sets the custom [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) to use. |\n\nInherited Method Summary \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\nPublic Constructors \n\npublic **Builder** () \n\nPublic Methods \n\npublic [SubjectSegmenterOptions](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions) **build**\n() \n\npublic [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) **enableForegroundBitmap** () \nEnables foreground bitmap in [SubjectSegmentationResult](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmentationResult). \n\nReturns\n\n- this object, for chaining method calls \n\npublic [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) **enableForegroundConfidenceMask** () \nEnables foreground confidence mask in [SubjectSegmentationResult](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmentationResult). \n\nReturns\n\n- this object, for chaining method calls \n\npublic [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) **enableMultipleSubjects** ([SubjectSegmenterOptions.SubjectResultOptions](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.SubjectResultOptions) options) \nEnables multiple subjects in [SubjectSegmentationResult](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmentationResult). \n\nReturns\n\n- this object, for chaining method calls \n\npublic [SubjectSegmenterOptions.Builder](/android/reference/com/google/mlkit/vision/segmentation/subject/SubjectSegmenterOptions.Builder) **setExecutor** ([Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) executor) \nSets the custom [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html)\nto use. If no [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html)\nis set, an internal background thread pool will be used.\n\nMost clients should not need to call this method. \n\nParameters\n\n| executor | the [Executor](//developer.android.com/reference/java/util/concurrent/Executor.html) to use |\n|----------|---------------------------------------------------------------------------------------------|\n\nReturns\n\n- this object, for chaining method calls"]]