将OpenCV的iOS CvVideoCamera默认fps设置为30以上

时间:2017-03-01 05:13:47

标签: ios objective-c iphone opencv

每当尝试将CvVideoCamera的默认fps设置为30以上时,它都会保持设置为30 fps。它允许我将它设置得更低,但没有超过30 fps。我正在使用iPhone 7,所以我知道它能够以60fps的速度拍摄1920x1080的视频。我已经研究过使用AVCaptureSession,但OpenCV的CvVideoCamera允许轻松访问和处理各个帧,所以我想尽可能坚持使用它。

self.videoCamera = [[CvVideoCamera alloc]initWithParentView:self.videoPreviewView]; self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionBack; self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPreset1920x1080; self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationLandscapeLeft; self.videoCamera.defaultFPS = 60; //This still sets it to 30 FPS self.videoCamera.grayscaleMode = NO; self.videoCamera.delegate = self;

0 个答案:

没有答案