PoseLandmark

public class PoseLandmark extends Object

Represents one pose landmark in a detected pose.

Nested Class Summary

@interface PoseLandmark.LandmarkType Landmark types for pose. 

Constant Summary

int LEFT_ANKLE The landmark which corresponds to the left ankle.
int LEFT_EAR The landmark which corresponds to the left ear.
int LEFT_ELBOW The landmark which corresponds to the left elbow.
int LEFT_EYE The landmark which corresponds to the left eye.
int LEFT_EYE_INNER The landmark which corresponds to the inner left eye.
int LEFT_EYE_OUTER The landmark which corresponds to the outer left eye.
int LEFT_FOOT_INDEX The landmark which corresponds to the left foot index.
int LEFT_HEEL The landmark which corresponds to the left heel.
int LEFT_HIP The landmark which corresponds to the left hip.
int LEFT_INDEX The landmark which corresponds to the left index finger.
int LEFT_KNEE The landmark which corresponds to the left knee.
int LEFT_MOUTH The landmark which corresponds to the left mouth.
int LEFT_PINKY The landmark which corresponds to the left pinky.
int LEFT_SHOULDER The landmark which corresponds to the left shoulder.
int LEFT_THUMB The landmark which corresponds to the left thumb.
int LEFT_WRIST The landmark which corresponds to the left wrist.
int NOSE The landmark which corresponds to the nose.
int RIGHT_ANKLE The landmark which corresponds to the right ankle.
int RIGHT_EAR The landmark which corresponds to the right ear.
int RIGHT_ELBOW The landmark which corresponds to the right elbow.
int RIGHT_EYE The landmark which corresponds to the left eye.
int RIGHT_EYE_INNER The landmark which corresponds to the inner left eye.
int RIGHT_EYE_OUTER The landmark which corresponds to the outer left eye.
int RIGHT_FOOT_INDEX The landmark which corresponds to the right foot index.
int RIGHT_HEEL The landmark which corresponds to the right heel.
int RIGHT_HIP The landmark which corresponds to the right hip.
int RIGHT_INDEX The landmark which corresponds to the right index finger.
int RIGHT_KNEE The landmark which corresponds to the right knee.
int RIGHT_MOUTH The landmark which corresponds to the right mouth.
int RIGHT_PINKY The landmark which corresponds to the right pinky.
int RIGHT_SHOULDER The landmark which corresponds to the right shoulder.
int RIGHT_THUMB The landmark which corresponds to the right thumb.
int RIGHT_WRIST The landmark which corresponds to the right wrist.

Public Method Summary

float
getInFrameLikelihood()
Gets the likelihood that a PoseLandmark is within the image frame.
int
getLandmarkType()
Gets the landmark type for the PoseLandmark.
PointF
getPosition()
Gets the 2D position of the PoseLandmark.
PointF3D
getPosition3D()
Gets the 3D position of the PoseLandmark.

Inherited Method Summary

Constants

public static final int LEFT_ANKLE

The landmark which corresponds to the left ankle.

Constant Value: 27

public static final int LEFT_EAR

The landmark which corresponds to the left ear.

Constant Value: 7

public static final int LEFT_ELBOW

The landmark which corresponds to the left elbow.

Constant Value: 13

public static final int LEFT_EYE

The landmark which corresponds to the left eye.

Constant Value: 2

public static final int LEFT_EYE_INNER

The landmark which corresponds to the inner left eye.

Constant Value: 1

public static final int LEFT_EYE_OUTER

The landmark which corresponds to the outer left eye.

Constant Value: 3

public static final int LEFT_FOOT_INDEX

The landmark which corresponds to the left foot index.

Constant Value: 31

public static final int LEFT_HEEL

The landmark which corresponds to the left heel.

Constant Value: 29

public static final int LEFT_HIP

The landmark which corresponds to the left hip.

Constant Value: 23

public static final int LEFT_INDEX

The landmark which corresponds to the left index finger.

Constant Value: 19

public static final int LEFT_KNEE

The landmark which corresponds to the left knee.

Constant Value: 25

public static final int LEFT_MOUTH

The landmark which corresponds to the left mouth.

Constant Value: 9

public static final int LEFT_PINKY

The landmark which corresponds to the left pinky.

Constant Value: 17

public static final int LEFT_SHOULDER

The landmark which corresponds to the left shoulder.

Constant Value: 11

public static final int LEFT_THUMB

The landmark which corresponds to the left thumb.

Constant Value: 21

public static final int LEFT_WRIST

The landmark which corresponds to the left wrist.

Constant Value: 15

public static final int NOSE

The landmark which corresponds to the nose.

Constant Value: 0

public static final int RIGHT_ANKLE

The landmark which corresponds to the right ankle.

Constant Value: 28

public static final int RIGHT_EAR

The landmark which corresponds to the right ear.

Constant Value: 8

public static final int RIGHT_ELBOW

The landmark which corresponds to the right elbow.

Constant Value: 14

public static final int RIGHT_EYE

The landmark which corresponds to the left eye.

Constant Value: 5

public static final int RIGHT_EYE_INNER

The landmark which corresponds to the inner left eye.

Constant Value: 4

public static final int RIGHT_EYE_OUTER

The landmark which corresponds to the outer left eye.

Constant Value: 6

public static final int RIGHT_FOOT_INDEX

The landmark which corresponds to the right foot index.

Constant Value: 32

public static final int RIGHT_HEEL

The landmark which corresponds to the right heel.

Constant Value: 30

public static final int RIGHT_HIP

The landmark which corresponds to the right hip.

Constant Value: 24

public static final int RIGHT_INDEX

The landmark which corresponds to the right index finger.

Constant Value: 20

public static final int RIGHT_KNEE

The landmark which corresponds to the right knee.

Constant Value: 26

public static final int RIGHT_MOUTH

The landmark which corresponds to the right mouth.

Constant Value: 10

public static final int RIGHT_PINKY

The landmark which corresponds to the right pinky.

Constant Value: 18

public static final int RIGHT_SHOULDER

The landmark which corresponds to the right shoulder.

Constant Value: 12

public static final int RIGHT_THUMB

The landmark which corresponds to the right thumb.

Constant Value: 22

public static final int RIGHT_WRIST

The landmark which corresponds to the right wrist.

Constant Value: 16

Public Methods

public float getInFrameLikelihood ()

Gets the likelihood that a PoseLandmark is within the image frame.

It is in range [0.0f, 1.0f].

A lower in-frame-likelihood indicates that the part of the body representing this landmark is likely not visible in the frame. As a result the confidence of this prediction can be considered low.

public int getLandmarkType ()

Gets the landmark type for the PoseLandmark.

public PointF getPosition ()

Gets the 2D position of the PoseLandmark.

The return value is always non-null.

public PointF3D getPosition3D ()

Gets the 3D position of the PoseLandmark.

The return value is always non-null.

More information on the Z value:

  • The Z value is an experimental feature that returns an extra Z coordinate along with X and Y. Please note that this value is less accurate than the X and Y values.
  • The unit of measure for the Z value is the same as X and Y.
  • The smaller the Z value, the closer that landmark is to the camera.
  • Different from X and Y, Z does not have a fixed origin in the image space. The Z origin is approximately at the center of the subject’s hips. Z value will be negative if the landmark is in front of the Z origin and will be positive if the landmark is behind the Z origin.
  • The Z value does not have a fixed lower or upper bound.