Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVCaptureSession VS UIImagePickerController camera preview

I'm developing an application similar to Instagram iOS app. Instagram have a custom camera preview. I want to develop something similar and the question is - what to use better for this purpose - UIImagePickerController with custom cameraOverlayView property or should I use AVCaptureSession ? Maybe someone have such experience and can give me an advice. Will be appreciate.

like image 467
Seliver Avatar asked Feb 10 '23 03:02

Seliver


1 Answers

AVCaptureSession is more customisable than UIImagePickerController. In case of speed, there is not much difference. If you are using AVCaptureSession it is possible to switch between whiteBalanceMode, focusMode and exposureMode when taking still images. Also we can specify the quality of the taking photo. In case of UIImagePickerController, the camera view will be presented and we can add overlay on it. But in case of AVCaptureSession, we can manage the camera as a normal view and add controls over it. So I think AVCaptureSession will be more suitable for your requirement.

The below link will give you more details about implementing AVCaptureSession. https://developer.apple.com/library/prerelease/ios/samplecode/AVCam/Introduction/Intro.html

like image 185
Tinku George Avatar answered Feb 20 '23 19:02

Tinku George