Builder for HandLandmarker.HandLandmarkerOptions
.
Public Constructors
Builder()
|
Public Methods
Inherited Methods
Public Constructors
public Builder ()
Public Methods
public final HandLandmarker.HandLandmarkerOptions build ()
Validates and builds the HandLandmarker.HandLandmarkerOptions
instance.
Throws
IllegalArgumentException | if the result listener and the running mode are not properly configured. The result listener should only be set when the hand landmarker is in the live stream mode. |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setBaseOptions (BaseOptions value)
Sets the base options for the hand landmarker task.
Parameters
value |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setErrorListener (ErrorListener value)
Sets an optional error listener.
Parameters
value |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setMinHandDetectionConfidence (Float value)
Sets minimum confidence score for the hand detection to be considered successful
Parameters
value |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setMinHandPresenceConfidence (Float value)
Sets minimum confidence score of hand presence score in the hand landmark detection.
Parameters
value |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setMinTrackingConfidence (Float value)
Sets the minimum confidence score for the hand tracking to be considered successful.
Parameters
value |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setNumHands (Integer value)
Sets the maximum number of hands can be detected by the HandLandmarker.
Parameters
value |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setResultListener (ResultListener<HandLandmarkerResult, MPImage> value)
Sets the result listener to receive the detection results asynchronously when the hand landmarker is in the live stream mode.
Parameters
value |
---|
public abstract HandLandmarker.HandLandmarkerOptions.Builder setRunningMode (RunningMode value)
Sets the running mode for the hand landmarker task. Default to the image mode. Hand landmarker has three modes:
- IMAGE: The mode for detecting hand landmarks on single image inputs.
- VIDEO: The mode for detecting hand landmarks on the decoded frames of a video.
- LIVE_STREAM: The mode for for detecting hand 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 |
---|