Change "numberOfHands" property name to "numHands".

PiperOrigin-RevId: 534927982
This commit is contained in:
Sebastian Schmidt 2023-05-24 11:52:27 -07:00 committed by Copybara-Service
parent 7facc925ba
commit a7b81c7d10
3 changed files with 4 additions and 4 deletions

View File

@ -87,7 +87,7 @@ NS_SWIFT_NAME(GestureRecognizerOptions)
gestureRecognizerLiveStreamDelegate;
/** Sets the maximum number of hands can be detected by the GestureRecognizer. */
@property(nonatomic) NSInteger numberOfHands NS_SWIFT_NAME(numHands);
@property(nonatomic) NSInteger numHands;
/** Sets minimum confidence score for the hand detection to be considered successful */
@property(nonatomic) float minHandDetectionConfidence;

View File

@ -19,7 +19,7 @@
- (instancetype)init {
self = [super init];
if (self) {
_numberOfHands = 1;
_numHands = 1;
_minHandDetectionConfidence = 0.5f;
_minHandPresenceConfidence = 0.5f;
_minTrackingConfidence = 0.5f;
@ -33,7 +33,7 @@
gestureRecognizerOptions.runningMode = self.runningMode;
gestureRecognizerOptions.gestureRecognizerLiveStreamDelegate =
self.gestureRecognizerLiveStreamDelegate;
gestureRecognizerOptions.numberOfHands = self.numberOfHands;
gestureRecognizerOptions.numHands = self.numHands;
gestureRecognizerOptions.minHandDetectionConfidence = self.minHandDetectionConfidence;
gestureRecognizerOptions.minHandPresenceConfidence = self.minHandPresenceConfidence;
gestureRecognizerOptions.minTrackingConfidence = self.minTrackingConfidence;

View File

@ -60,7 +60,7 @@ using ClassifierOptionsProto = ::mediapipe::tasks::components::processors::proto
HandDetectorGraphOptionsProto *handDetectorGraphOptionsProto =
handLandmarkerGraphOptionsProto->mutable_hand_detector_graph_options();
handDetectorGraphOptionsProto->Clear();
handDetectorGraphOptionsProto->set_num_hands(self.numberOfHands);
handDetectorGraphOptionsProto->set_num_hands(self.numHands);
handDetectorGraphOptionsProto->set_min_detection_confidence(self.minHandDetectionConfidence);
HandLandmarksDetectorGraphOptionsProto *handLandmarksDetectorGraphOptionsProto =