GestureRecognizer.GestureRecognizerOptions.Builder

public static abstract class GestureRecognizer.GestureRecognizerOptions.Builder

Public Constructors

Public Methods

final GestureRecognizer.GestureRecognizerOptions
build()
Validates and builds the GestureRecognizer.GestureRecognizerOptions instance.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setBaseOptions(BaseOptions value)
Sets the base options for the gesture recognizer task.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setCannedGesturesClassifierOptions(ClassifierOptions classifierOptions)
Sets the optional ClassifierOptions controlling the canned gestures classifier, such as score threshold, allow list and deny list of gestures.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setCustomGesturesClassifierOptions(ClassifierOptions classifierOptions)
Sets the optional ClassifierOptions controlling the custom gestures classifier, such as score threshold, allow list and deny list of gestures.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setErrorListener(ErrorListener value)
Sets an optional error listener.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setMinHandDetectionConfidence(Float value)
Sets minimum confidence score for the hand detection to be considered successful
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setMinHandPresenceConfidence(Float value)
Sets minimum confidence score of hand presence score in the hand landmark detection.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setMinTrackingConfidence(Float value)
Sets the minimum confidence score for the hand tracking to be considered successful.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setNumHands(Integer value)
Sets the maximum number of hands can be detected by the GestureRecognizer.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setResultListener(ResultListener<GestureRecognizerResultMPImage> value)
Sets the result listener to receive the detection results asynchronously when the gesture recognizer is in the live stream mode.
abstract GestureRecognizer.GestureRecognizerOptions.Builder
setRunningMode(RunningMode value)
Sets the running mode for the gesture recognizer task.

Inherited Methods

Public Constructors

public Builder ()

Public Methods

public final GestureRecognizer.GestureRecognizerOptions build ()

Validates and builds the GestureRecognizer.GestureRecognizerOptions instance.

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

public abstract GestureRecognizer.GestureRecognizerOptions.Builder setBaseOptions (BaseOptions value)

Sets the base options for the gesture recognizer task.

Parameters
value

public abstract GestureRecognizer.GestureRecognizerOptions.Builder setCannedGesturesClassifierOptions (ClassifierOptions classifierOptions)

Sets the optional ClassifierOptions controlling the canned gestures classifier, such as score threshold, allow list and deny list of gestures. The categories for canned gesture classifiers are: ["None", "Closed_Fist", "Open_Palm", "Pointing_Up", "Thumb_Down", "Thumb_Up", "Victory", "ILoveYou"]

TODO Note this option is subject to change, after scoring merging calculator is implemented.

Parameters
classifierOptions

public abstract GestureRecognizer.GestureRecognizerOptions.Builder setCustomGesturesClassifierOptions (ClassifierOptions classifierOptions)

Sets the optional ClassifierOptions controlling the custom gestures classifier, such as score threshold, allow list and deny list of gestures.

TODO Note this option is subject to change, after scoring merging calculator is implemented.

Parameters
classifierOptions

public abstract GestureRecognizer.GestureRecognizerOptions.Builder setErrorListener (ErrorListener value)

Sets an optional error listener.

Parameters
value

public abstract GestureRecognizer.GestureRecognizerOptions.Builder setMinHandDetectionConfidence (Float value)

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

Parameters
value

public abstract GestureRecognizer.GestureRecognizerOptions.Builder setMinHandPresenceConfidence (Float value)

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

Parameters
value