removed redundant camera rotation parameter from PoseTrackingOptions
This commit is contained in:
parent
d971143040
commit
8372703870
|
@ -15,7 +15,7 @@
|
|||
"""Configuration helper for iOS app bundle ids and provisioning profiles.
|
||||
"""
|
||||
|
||||
BUNDLE_ID_PREFIX = "*SEE_IOS_INSTRUCTIONS*.mediapipe.examples"
|
||||
BUNDLE_ID_PREFIX = "a09f2333-1ef2-4378-b82d-658a2d248aa5.mediapipe.examples"
|
||||
|
||||
# Look for a provisioning profile in the example's directory first,
|
||||
# otherwise look for a common one.
|
||||
|
|
|
@ -31,7 +31,7 @@ static const char* kLandmarksOutputStream = "pose_landmarks";
|
|||
[super viewDidLoad];
|
||||
|
||||
// create pose tracking options
|
||||
PoseTrackingOptions* options = [ [PoseTrackingOptions alloc] initWithShowLandmarks:true cameraRotation:0];
|
||||
PoseTrackingOptions* options = [ [PoseTrackingOptions alloc] initWithShowLandmarks:true];
|
||||
// create pose tracking from options
|
||||
self.poseTracking = [[PoseTracking alloc] initWithPoseTrackingOptions:options];
|
||||
// render pose tracking to a UIView (self.liveView)
|
||||
|
@ -63,7 +63,14 @@ static const char* kLandmarksOutputStream = "pose_landmarks";
|
|||
//self.cameraSource.videoMirrored = YES;
|
||||
|
||||
// The frame's native format is rotated with respect to the portrait orientation.
|
||||
// 0 degree
|
||||
self.cameraSource.orientation = AVCaptureVideoOrientationPortrait;
|
||||
//90 degree
|
||||
// self.cameraSource.orientation = AVCaptureVideoOrientationLandscapeRight;
|
||||
//180 degree
|
||||
// self.cameraSource.orientation = AVCaptureVideoOrientationPortraitUpsideDown;
|
||||
//270 degree
|
||||
// self.cameraSource.orientation = AVCaptureVideoOrientationLandscapeLeft;
|
||||
|
||||
// request camera access permission
|
||||
[self.cameraSource requestCameraAccessWithCompletionHandler:^void(BOOL granted) {
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
@interface PoseTrackingOptions: NSObject
|
||||
|
||||
@property(nonatomic) bool showLandmarks;
|
||||
@property(nonatomic) int cameraRotation;
|
||||
//@property(nonatomic) int cameraRotation;
|
||||
|
||||
- (instancetype) initWithShowLandmarks : (bool) showLandmarks cameraRotation:(int) cameraRotation;
|
||||
- (instancetype) initWithShowLandmarks : (bool) showLandmarks;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
@implementation PoseTrackingOptions
|
||||
|
||||
- (instancetype) initWithShowLandmarks : (bool) showLandmarks cameraRotation:(int) cameraRotation{
|
||||
self.cameraRotation = cameraRotation;
|
||||
- (instancetype) initWithShowLandmarks : (bool) showLandmarks {
|
||||
// self.cameraRotation = cameraRotation;
|
||||
self.showLandmarks = showLandmarks;
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user