HandLandmarker

public final class HandLandmarker

Performs hand landmarks detection on images.

This API expects a pre-trained hand landmarks model asset bundle. See .

  • Input image MPImage
    • The image that hand landmarks detection runs on.
  • Output HandLandmarkerResult HandLandmarkerResult
    • A HandLandmarkerResult containing hand landmarks.

Nested Classes

class HandLandmarker.HandLandmarkerOptions Options for setting up an HandLandmarker

Fields

public static final Set<Connection> HAND_CONNECTIONS
public static final Set<Connection> HAND_INDEX_FINGER_CONNECTIONS
public static final Set<Connection> HAND_MIDDLE_FINGER_CONNECTIONS
public static final Set<Connection> HAND_PALM_CONNECTIONS
public static final Set<Connection> HAND_PINKY_FINGER_CONNECTIONS
public static final Set<Connection> HAND_RING_FINGER_CONNECTIONS
public static final Set<Connection> HAND_THUMB_CONNECTIONS

Public Methods

static HandLandmarker
createFromBuffer(Context context, ByteBuffer modelBuffer)
Creates a HandLandmarker instance from a model buffer and the default HandLandmarker.HandLandmarkerOptions.
static HandLandmarker
createFromFile(Context context, String modelPath)
Creates a HandLandmarker instance from a model file and the default HandLandmarker.HandLandmarkerOptions.
static HandLandmarker
createFromFile(Context context, File modelFile)
Creates a HandLandmarker instance from a model file and the default HandLandmarker.HandLandmarkerOptions.
static HandLandmarker
HandLandmarkerResult
detect(MPImage image)
Performs hand landmarks detection on the provided single image with default image processing options, i.e.
HandLandmarkerResult
detect(MPImage image, ImageProcessingOptions imageProcessingOptions)
Performs hand landmarks detection on the provided single image.
void
detectAsync(MPImage image, ImageProcessingOptions imageProcessingOptions, long timestampMs)
Sends live image data to perform hand landmarks detection, and the results will be available via the OutputHandler.ResultListener provided in the HandLandmarker.HandLandmarkerOptions.
void
detectAsync(MPImage image, long timestampMs)
Sends live image data to perform hand landmarks detection with default image processing options, i.e.
HandLandmarkerResult
detectForVideo(MPImage image, ImageProcessingOptions imageProcessingOptions, long timestampMs)
Performs hand landmarks detection on the provided video frame.
HandLandmarkerResult
detectForVideo(MPImage image, long timestampMs)
Performs hand landmarks detection on the provided video frame with default image processing options, i.e.

Inherited Methods

Fields

public static final Set<Connection> HAND_CONNECTIONS

public static final Set<Connection> HAND_INDEX_FINGER_CONNECTIONS

public static final Set<Connection> HAND_MIDDLE_FINGER_CONNECTIONS

public static final Set<Connection> HAND_PALM_CONNECTIONS

public static final Set<Connection> HAND_PINKY_FINGER_CONNECTIONS

public static final Set<Connection> HAND_RING_FINGER_CONNECTIONS

public static final Set<Connection> HAND_THUMB_CONNECTIONS

Public Methods

public static HandLandmarker createFromBuffer (Context context, ByteBuffer modelBuffer)

Creates a HandLandmarker instance from a model buffer and the default HandLandmarker.HandLandmarkerOptions.

Parameters
context an Android ERROR(/Context).
modelBuffer a direct ByteBuffer or a ERROR(/MappedByteBuffer) of the detection model.
Throws
if there is an error during HandLandmarker creation.