Set OpenCV iOS CvVideoCamera default fps above 30

Whenever you try to set the default fv value of CvVideoCamera to above 30, it remains set to 30 frames per second. This allows me to set it lower, but not higher than 30 fps. I use iPhone 7, so I know that it is capable of shooting video with a resolution of 1920x1080 at a speed of 60 frames per second. I studied the use of AVCaptureSession, but OpenCV CvVideoCamera provides easy access and processing of individual frames, so I would like to stick with it, if at all possible.

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;

+4
source share

Source: https://habr.com/ru/post/1671101/


All Articles