Updated variable name in MPPGestureRecognizerTests.m
This commit is contained in:
parent
f3f664300c
commit
9546596b5a
|
@ -320,8 +320,8 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
||||||
[self gestureRecognizerOptionsWithModelFileInfo:kGestureRecognizerBundleAssetFile];
|
[self gestureRecognizerOptionsWithModelFileInfo:kGestureRecognizerBundleAssetFile];
|
||||||
|
|
||||||
const NSInteger numberOfHands = 2;
|
const NSInteger numHands = 2;
|
||||||
gestureRecognizerOptions.numberOfHands = numberOfHands;
|
gestureRecognizerOptions.numHands = numHands;
|
||||||
|
|
||||||
MPPGestureRecognizer *gestureRecognizer =
|
MPPGestureRecognizer *gestureRecognizer =
|
||||||
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
||||||
|
@ -329,15 +329,15 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
MPPGestureRecognizerResult *gestureRecognizerResult =
|
MPPGestureRecognizerResult *gestureRecognizerResult =
|
||||||
[self recognizeImageWithFileInfo:kTwoHandsImage usingGestureRecognizer:gestureRecognizer];
|
[self recognizeImageWithFileInfo:kTwoHandsImage usingGestureRecognizer:gestureRecognizer];
|
||||||
|
|
||||||
XCTAssertTrue(gestureRecognizerResult.handedness.count == numberOfHands);
|
XCTAssertTrue(gestureRecognizerResult.handedness.count == numHands);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testRecognizeWithRotationSucceeds {
|
- (void)testRecognizeWithRotationSucceeds {
|
||||||
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
||||||
[self gestureRecognizerOptionsWithModelFileInfo:kGestureRecognizerBundleAssetFile];
|
[self gestureRecognizerOptionsWithModelFileInfo:kGestureRecognizerBundleAssetFile];
|
||||||
|
|
||||||
const NSInteger numberOfHands = 2;
|
const NSInteger numHands = 2;
|
||||||
gestureRecognizerOptions.numberOfHands = numberOfHands;
|
gestureRecognizerOptions.numHands = numHands;
|
||||||
|
|
||||||
MPPGestureRecognizer *gestureRecognizer =
|
MPPGestureRecognizer *gestureRecognizer =
|
||||||
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
||||||
|
@ -360,8 +360,8 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
MPPGestureRecognizerOptions *gestureRecognizerOptions =
|
||||||
[self gestureRecognizerOptionsWithModelFileInfo:kGestureRecognizerBundleAssetFile];
|
[self gestureRecognizerOptionsWithModelFileInfo:kGestureRecognizerBundleAssetFile];
|
||||||
|
|
||||||
const NSInteger numberOfHands = 1;
|
const NSInteger numHands = 1;
|
||||||
gestureRecognizerOptions.numberOfHands = numberOfHands;
|
gestureRecognizerOptions.numHands = numHands;
|
||||||
|
|
||||||
MPPGestureRecognizer *gestureRecognizer =
|
MPPGestureRecognizer *gestureRecognizer =
|
||||||
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
||||||
|
@ -379,8 +379,8 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
gestureRecognizerOptions.cannedGesturesClassifierOptions.scoreThreshold = 0.5f;
|
gestureRecognizerOptions.cannedGesturesClassifierOptions.scoreThreshold = 0.5f;
|
||||||
gestureRecognizerOptions.cannedGesturesClassifierOptions.categoryAllowlist = @[ kFistLabel ];
|
gestureRecognizerOptions.cannedGesturesClassifierOptions.categoryAllowlist = @[ kFistLabel ];
|
||||||
|
|
||||||
const NSInteger numberOfHands = 1;
|
const NSInteger numHands = 1;
|
||||||
gestureRecognizerOptions.numberOfHands = numberOfHands;
|
gestureRecognizerOptions.numHands = numHands;
|
||||||
|
|
||||||
MPPGestureRecognizer *gestureRecognizer =
|
MPPGestureRecognizer *gestureRecognizer =
|
||||||
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
||||||
|
@ -398,8 +398,8 @@ static const float kLandmarksErrorTolerance = 0.03f;
|
||||||
gestureRecognizerOptions.cannedGesturesClassifierOptions.scoreThreshold = 0.5f;
|
gestureRecognizerOptions.cannedGesturesClassifierOptions.scoreThreshold = 0.5f;
|
||||||
gestureRecognizerOptions.cannedGesturesClassifierOptions.categoryDenylist = @[ kFistLabel ];
|
gestureRecognizerOptions.cannedGesturesClassifierOptions.categoryDenylist = @[ kFistLabel ];
|
||||||
|
|
||||||
const NSInteger numberOfHands = 1;
|
const NSInteger numHands = 1;
|
||||||
gestureRecognizerOptions.numberOfHands = numberOfHands;
|
gestureRecognizerOptions.numHands = numHands;
|
||||||
|
|
||||||
MPPGestureRecognizer *gestureRecognizer =
|
MPPGestureRecognizer *gestureRecognizer =
|
||||||
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
[self createGestureRecognizerWithOptionsSucceeds:gestureRecognizerOptions];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user