SubjectSegmenterOptions.Builder

  • SubjectSegmenterOptions.Builder is a builder class for SubjectSegmenterOptions.

  • This builder allows enabling features like foreground bitmap, foreground confidence mask, and multiple subjects in the segmentation result.

  • You can optionally set a custom Executor for processing.

  • The build() method creates the SubjectSegmenterOptions object with the configured settings.

public static class SubjectSegmenterOptions.Builder extends Object

Builder class for SubjectSegmenterOptions.

Public Constructor Summary

Public Method Summary

SubjectSegmenterOptions
SubjectSegmenterOptions.Builder
enableForegroundBitmap()
Enables foreground bitmap in SubjectSegmentationResult.
SubjectSegmenterOptions.Builder
enableForegroundConfidenceMask()
Enables foreground confidence mask in SubjectSegmentationResult.
SubjectSegmenterOptions.Builder
SubjectSegmenterOptions.Builder
setExecutor(Executor executor)
Sets the custom Executor to use.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public SubjectSegmenterOptions build ()

public SubjectSegmenterOptions.Builder enableForegroundBitmap ()

Enables foreground bitmap in SubjectSegmentationResult.

Returns
  • this object, for chaining method calls

public SubjectSegmenterOptions.Builder enableForegroundConfidenceMask ()

Enables foreground confidence mask in SubjectSegmentationResult.

Returns
  • this object, for chaining method calls

public SubjectSegmenterOptions.Builder enableMultipleSubjects (SubjectSegmenterOptions.SubjectResultOptions options)

Enables multiple subjects in SubjectSegmentationResult.

Returns
  • this object, for chaining method calls

public SubjectSegmenterOptions.Builder setExecutor (Executor executor)

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.

Parameters
executor the Executor to use
Returns
  • this object, for chaining method calls