Subject

  • Subject represents a segmented subject from an input image, identified by the SubjectSegmenter.

  • Provides access to the subject's masked bitmap, confidence mask, height, width, and starting coordinates within the image.

  • Bitmap and confidence mask are optional and require enabling through SubjectSegmenterOptions.

  • Developers can utilize Subject to isolate and manipulate identified subjects within images.

  • Height, width, startX, and startY offer insights into the subject's position and dimensions within the original image.

public class Subject extends Object

A segmented subject from the input image by SubjectSegmenter.

Public Method Summary

Bitmap
getBitmap()
Returns the masked bitmap for this subject.
FloatBuffer
getConfidenceMask()
Returns the confidence mask for this subject.
int
getHeight()
Returns the height of this subject.
int
getStartX()
Returns the starting x-coordinate of this subject in the input image.
int
getStartY()
Returns the starting y-coordinate of this subject in the input image.
int
getWidth()
Returns the width of this subject.

Inherited Method Summary

Public Methods

public Bitmap getBitmap ()

Returns the masked bitmap for this subject.

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

public FloatBuffer getConfidenceMask ()

Returns the confidence mask for this subject.

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

public int getHeight ()

Returns the height of this subject.

public int getStartX ()

Returns the starting x-coordinate of this subject in the input image.

public int getStartY ()

Returns the starting y-coordinate of this subject in the input image.

public int getWidth ()

Returns the width of this subject.