GestureRecognizer

public final class GestureRecognizer

Performs gesture recognition on images.

This API expects a pre-trained hand gesture model asset bundle, or a custom one created using Model Maker. See .

  • Input image MPImage
    • The image that gesture recognition runs on.
  • Output GestureRecognizerResult GestureRecognizerResult
    • A GestureRecognizerResult containing hand landmarks and recognized hand gestures.

Nested Classes

class GestureRecognizer.GestureRecognizerOptions Options for setting up an GestureRecognizer

Public Methods

static GestureRecognizer
createFromBuffer(Context context, ByteBuffer modelBuffer)
Creates a GestureRecognizer instance from a model buffer and the default GestureRecognizer.GestureRecognizerOptions.
static GestureRecognizer
createFromFile(Context context, String modelPath)
Creates a GestureRecognizer instance from a model file and the default GestureRecognizer.GestureRecognizerOptions.
static GestureRecognizer
createFromFile(Context context, File modelFile)
Creates a GestureRecognizer instance from a model file and the default GestureRecognizer.GestureRecognizerOptions.
static GestureRecognizer
GestureRecognizerResult
recognize(MPImage image)
Performs gesture recognition on the provided single image with default image processing options, i.e.
GestureRecognizerResult
recognize(MPImage image, ImageProcessingOptions imageProcessingOptions)
Performs gesture recognition on the provided single image.
void
recognizeAsync(MPImage image, long timestampMs)
Sends live image data to perform gesture recognition with default image processing options, i.e.
void