Skip to content

Commit

Permalink
Fixes iOS hand landmarker connections
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 565442497
  • Loading branch information
schmidt-sebastian authored and copybara-github committed Sep 14, 2023
1 parent 124a4de commit 85b1938
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ typedef NS_ENUM(NSUInteger, MPPHandLandmark) {

MPPHandLandmarkThumbIP,

MPPHandLandmarkThumbTIP,

MPPHandLandmarkIndexFingerMCP,

MPPHandLandmarkIndexFingerPIP,
Expand Down Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ - (BOOL)detectAsyncInImage:(MPPImage *)image
return MPPHandPalmConnections;
}

+ (NSArray<MPPConnection *> *)handThumbConnections {
return MPPHandThumbConnections;
}

+ (NSArray<MPPConnection *> *)handIndexFingerConnections {
return MPPHandIndexFingerConnections;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 85b1938

Please sign in to comment.