iOS中的OpenCV - 停止相机后最后帧延迟10-15秒

时间:2015-02-15 12:07:15

标签: ios opencv video-processing

停止相机后,最后一帧延迟10-15秒。我该如何解决?

...     
[self.videoCamera stop]; // after this last frame remains within 10 sec
...

- (void)viewDidLoad {
     [super viewDidLoad];

     // Start OpenCV camera
     self.videoCamera = [[CvVideoCamera alloc] initWithParentView:_imageView];
     self.videoCamera.delegate = self;
     self.videoCamera.defaultAVCaptureDevicePosition = AVCaptureDevicePositionFront;
     self.videoCamera.defaultAVCaptureSessionPreset = AVCaptureSessionPresetPhoto;
    self.videoCamera.defaultAVCaptureVideoOrientation = AVCaptureVideoOrientationPortrait;
    [self.videoCamera start];
}

1 个答案:

答案 0 :(得分:0)

我在Change Lable text from OpenCV ProcessImage method on iOS找到了答案。我忘记了这个过程是在后台进行的