PoseLandmarker.PoseLandmarkerOptions.Builder

public static abstract class PoseLandmarker.PoseLandmarkerOptions.Builder

Public Constructors

Public Methods

final PoseLandmarker.PoseLandmarkerOptions
build()
Validates and builds the PoseLandmarker.PoseLandmarkerOptions instance.
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setBaseOptions(BaseOptions value)
Sets the base options for the pose landmarker task.
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setErrorListener(ErrorListener value)
Sets an optional error listener.
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setMinPoseDetectionConfidence(Float value)
Sets minimum confidence score for the pose detection to be considered successful
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setMinPosePresenceConfidence(Float value)
Sets minimum confidence score of pose presence score in the pose landmark detection.
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setMinTrackingConfidence(Float value)
Sets the minimum confidence score for the pose tracking to be considered successful.
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setNumPoses(Integer value)
Sets the maximum number of poses can be detected by the PoseLandmarker.
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setResultListener(ResultListener<PoseLandmarkerResultMPImage> value)
Sets the result listener to receive the detection results asynchronously when the pose landmarker is in the live stream mode.
abstract PoseLandmarker.PoseLandmarkerOptions.Builder
setRunningMode(RunningMode value)
Sets the running mode for the pose landmarker task.

Inherited Methods

Public Constructors

public Builder ()

Public Methods

public final PoseLandmarker.PoseLandmarkerOptions build ()

Validates and builds the PoseLandmarker.PoseLandmarkerOptions instance.

Throws
IllegalArgumentException if the result listener and the running mode are not properly configured. The result listener should only be set when the pose landmarker is in the live stream mode.

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setBaseOptions (BaseOptions value)

Sets the base options for the pose landmarker task.

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setErrorListener (ErrorListener value)

Sets an optional error listener.

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setMinPoseDetectionConfidence (Float value)

Sets minimum confidence score for the pose detection to be considered successful

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setMinPosePresenceConfidence (Float value)

Sets minimum confidence score of pose presence score in the pose landmark detection.

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setMinTrackingConfidence (Float value)

Sets the minimum confidence score for the pose tracking to be considered successful.

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setNumPoses (Integer value)

Sets the maximum number of poses can be detected by the PoseLandmarker.

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setOutputSegmentationMasks (Boolean value)

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setResultListener (ResultListener<PoseLandmarkerResultMPImage> value)

Sets the result listener to receive the detection results asynchronously when the pose landmarker is in the live stream mode.

Parameters
value

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setRunningMode (RunningMode value)

Sets the running mode for the pose landmarker task. Default to the image mode. Pose landmarker has three modes:

  • IMAGE: The mode for detecting pose landmarks on single image inputs.
  • VIDEO: The mode for detecting pose landmarks on the decoded frames of a video.
  • LIVE_STREAM: The mode for for detecting pose landmarks on a live stream of input data, such as from camera. In this mode, setResultListener must be called to set up a listener to receive the detection results asynchronously.

Parameters
value