public final class PoseLandmarks

  1. Object
  2. PoseLandmarks

The joint names Pose.Landmark.getName() reports, as constants instead of literals. Backends detect different subsets of this list: ML Kit reports the hand and foot detail, Apple Vision reports NECK and ROOT that ML Kit does not, and a joint the backend did not report is simply absent. Read one through Pose.getLandmark(String) and check for null rather than assuming a fixed skeleton.

detector.process(VisionImage.fromCameraFrame(frame)).ready(pose -> {
    Pose.Landmark wrist = pose.getLandmark(PoseLandmarks.RIGHT_WRIST);
    Pose.Landmark shoulder = pose.getLandmark(PoseLandmarks.RIGHT_SHOULDER);
    if (wrist != null && shoulder != null
            && wrist.getConfidence() > 0.6f
            && wrist.getPosition().getY() < shoulder.getPosition().getY()) {
        Log.p("hand raised");
    }
});

Fields

public static final String NOSE = "nose"Tip of the nose.
public static final String LEFT_EYE_INNER = "leftEyeInner"Inner corner of the left eye.
public static final String LEFT_EYE = "leftEye"Center of the left eye.
public static final String LEFT_EYE_OUTER = "leftEyeOuter"Outer corner of the left eye.
public static final String RIGHT_EYE_INNER = "rightEyeInner"Inner corner of the right eye.
public static final String RIGHT_EYE = "rightEye"Center of the right eye.
public static final String RIGHT_EYE_OUTER = "rightEyeOuter"Outer corner of the right eye.
public static final String LEFT_EAR = "leftEar"Left ear.
public static final String RIGHT_EAR = "rightEar"Right ear.
public static final String LEFT_MOUTH = "leftMouth"Left corner of the mouth.
public static final String RIGHT_MOUTH = "rightMouth"Right corner of the mouth.
public static final String NECK = "neck"Base of the neck.
public static final String LEFT_SHOULDER = "leftShoulder"Left shoulder.
public static final String RIGHT_SHOULDER = "rightShoulder"Right shoulder.
public static final String LEFT_ELBOW = "leftElbow"Left elbow.
public static final String RIGHT_ELBOW = "rightElbow"Right elbow.
public static final String LEFT_WRIST = "leftWrist"Left wrist.
public static final String RIGHT_WRIST = "rightWrist"Right wrist.
public static final String LEFT_PINKY = "leftPinky"Left little finger.
public static final String RIGHT_PINKY = "rightPinky"Right little finger.
public static final String LEFT_INDEX = "leftIndex"Left index finger.
public static final String RIGHT_INDEX = "rightIndex"Right index finger.
public static final String LEFT_THUMB = "leftThumb"Left thumb.
public static final String RIGHT_THUMB = "rightThumb"Right thumb.
public static final String LEFT_HIP = "leftHip"Left hip.
public static final String RIGHT_HIP = "rightHip"Right hip.
public static final String ROOT = "root"Midpoint between the hips.
public static final String LEFT_KNEE = "leftKnee"Left knee.
public static final String RIGHT_KNEE = "rightKnee"Right knee.
public static final String LEFT_ANKLE = "leftAnkle"Left ankle.
public static final String RIGHT_ANKLE = "rightAnkle"Right ankle.
public static final String LEFT_HEEL = "leftHeel"Left heel.
public static final String RIGHT_HEEL = "rightHeel"Right heel.
public static final String LEFT_FOOT_INDEX = "leftFootIndex"Ball of the left foot.
public static final String RIGHT_FOOT_INDEX = "rightFootIndex"Ball of the right foot.
public static final String UNKNOWN = "unknown"Reported when a backend supplied a joint with no portable name here.

Inherited methods

Field details

NOSE

public static final String NOSE = "nose"
Tip of the nose.

LEFT_EYE_INNER

public static final String LEFT_EYE_INNER = "leftEyeInner"
Inner corner of the left eye.

LEFT_EYE

public static final String LEFT_EYE = "leftEye"
Center of the left eye.

LEFT_EYE_OUTER

public static final String LEFT_EYE_OUTER = "leftEyeOuter"
Outer corner of the left eye.

RIGHT_EYE_INNER

public static final String RIGHT_EYE_INNER = "rightEyeInner"
Inner corner of the right eye.

RIGHT_EYE

public static final String RIGHT_EYE = "rightEye"
Center of the right eye.

RIGHT_EYE_OUTER

public static final String RIGHT_EYE_OUTER = "rightEyeOuter"
Outer corner of the right eye.

LEFT_EAR

public static final String LEFT_EAR = "leftEar"
Left ear.

RIGHT_EAR

public static final String RIGHT_EAR = "rightEar"
Right ear.

LEFT_MOUTH

public static final String LEFT_MOUTH = "leftMouth"
Left corner of the mouth.

RIGHT_MOUTH

public static final String RIGHT_MOUTH = "rightMouth"
Right corner of the mouth.

NECK

public static final String NECK = "neck"
Base of the neck. Reported by Apple Vision; ML Kit omits it.

LEFT_SHOULDER

public static final String LEFT_SHOULDER = "leftShoulder"
Left shoulder.

RIGHT_SHOULDER

public static final String RIGHT_SHOULDER = "rightShoulder"
Right shoulder.

LEFT_ELBOW

public static final String LEFT_ELBOW = "leftElbow"
Left elbow.

RIGHT_ELBOW

public static final String RIGHT_ELBOW = "rightElbow"
Right elbow.

LEFT_WRIST

public static final String LEFT_WRIST = "leftWrist"
Left wrist.

RIGHT_WRIST

public static final String RIGHT_WRIST = "rightWrist"
Right wrist.

LEFT_PINKY

public static final String LEFT_PINKY = "leftPinky"
Left little finger. Reported by ML Kit; Apple Vision omits it.

RIGHT_PINKY

public static final String RIGHT_PINKY = "rightPinky"
Right little finger. Reported by ML Kit; Apple Vision omits it.

LEFT_INDEX

public static final String LEFT_INDEX = "leftIndex"
Left index finger. Reported by ML Kit; Apple Vision omits it.

RIGHT_INDEX

public static final String RIGHT_INDEX = "rightIndex"
Right index finger. Reported by ML Kit; Apple Vision omits it.

LEFT_THUMB

public static final String LEFT_THUMB = "leftThumb"
Left thumb. Reported by ML Kit; Apple Vision omits it.

RIGHT_THUMB

public static final String RIGHT_THUMB = "rightThumb"
Right thumb. Reported by ML Kit; Apple Vision omits it.

LEFT_HIP

public static final String LEFT_HIP = "leftHip"
Left hip.

RIGHT_HIP

public static final String RIGHT_HIP = "rightHip"
Right hip.

ROOT

public static final String ROOT = "root"
Midpoint between the hips. Reported by Apple Vision; ML Kit omits it.

LEFT_KNEE

public static final String LEFT_KNEE = "leftKnee"
Left knee.

RIGHT_KNEE

public static final String RIGHT_KNEE = "rightKnee"
Right knee.

LEFT_ANKLE

public static final String LEFT_ANKLE = "leftAnkle"
Left ankle.

RIGHT_ANKLE

public static final String RIGHT_ANKLE = "rightAnkle"
Right ankle.

LEFT_HEEL

public static final String LEFT_HEEL = "leftHeel"
Left heel. Reported by ML Kit; Apple Vision omits it.

RIGHT_HEEL

public static final String RIGHT_HEEL = "rightHeel"
Right heel. Reported by ML Kit; Apple Vision omits it.

LEFT_FOOT_INDEX

public static final String LEFT_FOOT_INDEX = "leftFootIndex"
Ball of the left foot. Reported by ML Kit; Apple Vision omits it.

RIGHT_FOOT_INDEX

public static final String RIGHT_FOOT_INDEX = "rightFootIndex"
Ball of the right foot. Reported by ML Kit; Apple Vision omits it.

UNKNOWN

public static final String UNKNOWN = "unknown"
Reported when a backend supplied a joint with no portable name here.