SubjectSegmentationResult

  • SubjectSegmentationResult is the output of SubjectSegmentation.

  • It provides methods to retrieve the masked bitmap, foreground confidence mask, and a list of segmented subjects from the input image.

  • Retrieving the masked bitmap and foreground confidence mask depends on enabling the corresponding options in SubjectSegmenterOptions.

  • Retrieving multiple subjects depends on enabling the option for multiple subjects in SubjectSegmenterOptions.

public class SubjectSegmentationResult extends Object

Result of SubjectSegmentation.

Public Method Summary

Bitmap
getForegroundBitmap()
Returns the masked bitmap for the input image.
FloatBuffer
getForegroundConfidenceMask()
Returns the foreground confidence mask for the input image.
List<Subject>
getSubjects()
Returns all segmented Subjects from the input image.

Inherited Method Summary

Public Methods

public Bitmap getForegroundBitmap ()

Returns the masked bitmap for the input image.

Returns null if it is not enabled by SubjectSegmenterOptions.Builder.enableForegroundConfidenceMask()

public FloatBuffer getForegroundConfidenceMask ()

Returns the foreground confidence mask for the input image.

Returns null if it is not enabled by SubjectSegmenterOptions.Builder.enableForegroundConfidenceMask()

public List<Subject> getSubjects ()

Returns all segmented Subjects from the input image.

Returns an empty list if multiple subjects are not enabled by SubjectSegmenterOptions.Builder.enableMultipleSubjects(SubjectSegmenterOptions.SubjectResultOptions).