PoseLandmarker.PoseLandmarkerOptions.Builder

public abstract class PoseLandmarker.PoseLandmarkerOptions.Builder


Builder for PoseLandmarkerOptions.

Summary

Public constructors

Public methods

final PoseLandmarker.PoseLandmarkerOptions

Validates and builds the PoseLandmarkerOptions instance.

abstract PoseLandmarker.PoseLandmarkerOptions.Builder

Sets the base options for the pose landmarker task.

abstract PoseLandmarker.PoseLandmarkerOptions.Builder

Sets an optional error listener.

abstract PoseLandmarker.PoseLandmarkerOptions.Builder

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

abstract PoseLandmarker.PoseLandmarkerOptions.Builder

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

abstract PoseLandmarker.PoseLandmarkerOptions.Builder

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

abstract PoseLandmarker.PoseLandmarkerOptions.Builder

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

abstract PoseLandmarker.PoseLandmarkerOptions.Builder
abstract PoseLandmarker.PoseLandmarkerOptions.Builder

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

abstract PoseLandmarker.PoseLandmarkerOptions.Builder

Sets the running mode for the pose landmarker task.

Public constructors

Builder

public Builder()

Public methods

build

public final PoseLandmarker.PoseLandmarkerOptions build()

Validates and builds the PoseLandmarkerOptions instance.

Throws
java.lang.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.

setBaseOptions

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

Sets the base options for the pose landmarker task.

setErrorListener

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

Sets an optional error listener.

setMinPoseDetectionConfidence

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

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

setMinPosePresenceConfidence

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

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

setMinTrackingConfidence

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

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

setNumPoses

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

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

setOutputSegmentationMasks

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

setResultListener

public abstract PoseLandmarker.PoseLandmarkerOptions.Builder setResultListener(
    OutputHandler.ResultListener<PoseLandmarkerResult, MPImage> value
)

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

setRunningMode

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.