diff --git a/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.h b/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.h index bed452cbce..80973d3915 100644 --- a/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.h +++ b/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.h @@ -33,6 +33,8 @@ typedef NS_ENUM(NSUInteger, MPPHandLandmark) { MPPHandLandmarkThumbIP, + MPPHandLandmarkThumbTIP, + MPPHandLandmarkIndexFingerMCP, MPPHandLandmarkIndexFingerPIP, @@ -78,6 +80,9 @@ NS_SWIFT_NAME(HandLandmarker) /** The array of connections between the landmarks in the palm. */ @property(class, nonatomic, readonly) NSArray *handPalmConnections; +/** The array of connections between the landmarks in the thumb. */ +@property(class, nonatomic, readonly) NSArray *handThumbConnections; + /** The array of connections between the landmarks in the index finger. */ @property(class, nonatomic, readonly) NSArray *handIndexFingerConnections; diff --git a/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.mm b/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.mm index b05e6755b6..cedbf0f23b 100644 --- a/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.mm +++ b/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarker.mm @@ -169,6 +169,10 @@ - (BOOL)detectAsyncInImage:(MPPImage *)image return MPPHandPalmConnections; } ++ (NSArray *)handThumbConnections { + return MPPHandThumbConnections; +} + + (NSArray *)handIndexFingerConnections { return MPPHandIndexFingerConnections; } diff --git a/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarksConnections.h b/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarksConnections.h index 33d16bee49..57b492b29d 100644 --- a/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarksConnections.h +++ b/mediapipe/tasks/ios/vision/hand_landmarker/sources/MPPHandLandmarksConnections.h @@ -44,8 +44,8 @@ NSArray *const MPPHandRingFingerConnections = @[ ]; NSArray *const MPPHandPinkyConnections = @[ - [[MPPConnection alloc] initWithStart:16 end:17], [[MPPConnection alloc] initWithStart:17 end:18], - [[MPPConnection alloc] initWithStart:18 end:19] + [[MPPConnection alloc] initWithStart:17 end:18], [[MPPConnection alloc] initWithStart:18 end:19], + [[MPPConnection alloc] initWithStart:19 end:20] ]; NSArray *const MPPHandConnections = [[[[[[NSArray