Fixes iOS hand landmarker connections

PiperOrigin-RevId: 565442497
This commit is contained in:
Sebastian Schmidt 2023-09-14 12:21:41 -07:00 committed by Copybara-Service
parent 124a4de08d
commit 85b19383b9
3 changed files with 11 additions and 2 deletions

View File

@ -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<MPPConnection *> *handPalmConnections;
/** The array of connections between the landmarks in the thumb. */
@property(class, nonatomic, readonly) NSArray<MPPConnection *> *handThumbConnections;
/** The array of connections between the landmarks in the index finger. */
@property(class, nonatomic, readonly) NSArray<MPPConnection *> *handIndexFingerConnections;

View File

@ -169,6 +169,10 @@ static NSString *const kTaskName = @"handLandmarker";
return MPPHandPalmConnections;
}
+ (NSArray<MPPConnection *> *)handThumbConnections {
return MPPHandThumbConnections;
}
+ (NSArray<MPPConnection *> *)handIndexFingerConnections {
return MPPHandIndexFingerConnections;
}

View File

@ -44,8 +44,8 @@ NSArray<MPPConnection *> *const MPPHandRingFingerConnections = @[
];
NSArray<MPPConnection *> *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<MPPConnection *> *const MPPHandConnections = [[[[[[NSArray