MediaPipeTasksVision Framework Reference

MPPGestureRecognizerResult


@interface MPPGestureRecognizerResult : MPPTaskResult

Represents the gesture recognition results generated by GestureRecognizer.

  • Hand landmarks of detected hands.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSArray<MPPNormalizedLandmark *> *> *_Nonnull landmarks;
  • Hand landmarks in world coordinates of detected hands.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSArray<MPPLandmark *> *> *_Nonnull worldLandmarks;
  • Handedness of detected hands.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSArray<MPPCategory *> *> *_Nonnull handedness;
  • Recognized hand gestures of detected hands. Note that the index of the gesture is always -1, because the raw indices from multiple gesture classifiers cannot consolidate to a meaningful index.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<NSArray<MPPCategory *> *> *_Nonnull gestures;
  • Initializes a new GestureRecognizerResult with the given landmarks, world landmarks, handedness, gestures and timestamp (in milliseconds).

    Declaration

    Objective-C

    - (nonnull instancetype)
               initWithGestures:
                   (nonnull NSArray<NSArray<MPPCategory *> *> *)gestures
                     handedness:
                         (nonnull NSArray<NSArray<MPPCategory *> *> *)handedness
                      landmarks:
                          (nonnull NSArray<NSArray<MPPNormalizedLandmark *> *> *)
                              landmarks
                 worldLandmarks:
                     (nonnull NSArray<NSArray<MPPLandmark *> *> *)worldLandmarks
        timestampInMilliseconds:(NSInteger)timestampInMilliseconds;

    Parameters

    landmarks

    The hand landmarks of detected hands.

    worldLandmarks

    The hand landmarks in world coordinates of detected hands.

    handedness

    The recognized hand gestures of detected hands.

    handedness

    The recognized hand gestures of detected hands.

    timestampInMilliseconds

    The timestamp for this result.

    Return Value

    An instance of GestureRecognizerResult initialized with the given landmarks, world landmarks, handedness and gestures.