AVCaptureSession VS UIImagePickerController camera preview - ios

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.

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

Related

IOS How to get image from IPhone camera scene by programmatically without press shoot button?

I am trying to get image from camera and send it to the server automatically.
So I want to know how to capture image from iphone camera scene without press shoot button.
Please help.
Thanks.
How to save photos taken using AVFoundation to Photo Album?
I use this code and solve problem.
https://developer.apple.com/library/content/samplecode/AVCam/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010112
AV Cam-iOS also can solve my problem.
Thank you everyone.
I don't think it is possible. Capturing image using Camera interface will trigger UIImagePickerControllerDelegate methods. The delegates are only called when you pick an image through camera shutter button/image cropper.

UIImagePickerController with timelapse/slowmo in iOS8

Can I add those features to a UIImagePickerController on iOS8?
In the camera app it seems like a native capability - but the question is do such an interface exist?
No, UIImagePickerController doesn't give you the option to record video in Slo Mo, Timelapse or add filters. For that you would have to use a Custom Camera built using the AVFoundation framework.

Does UIImagePicker Controller has access to all functionalities in IOS 7/IOS 8 camera app?

My requirement is to create a camera application, which contains all the functionalists like Photo,Video,Slow mo,Pano, filters.(like below screen)
My idea is to call the native camera api. I tried UIImagePickerController with options like this
cameraPickerUI.showsCameraControls =YES; but i can't bring filters, pano, slow mo option inside my application.
UIImagePicker Controller has access to all functionalities of camera api?
Using UIImagePickerController how to implement slow mo, filters,pano?(tiny help/ direction is more appreciated)
Please share your thoughts,suggestions,idea.
My device is IOS 7 version only.
Thanks!
No, you can't do it with UIImagePickerController. UIImagePickerController, it has not such kind of functionalities except crop facility.
You can use BradLarson's GPUImageView framework, with that you can do what you want.

UIImagePicker Adjusting Focus Observer?

Is there a way to find out if the camera is currently focusing with UIImagePicker? Similar to the way the adjustingFocus observer works with AVFoundation.
I'm currently using AVFoundation, but I would like to be able to have the image quality that is achieved with UIImagePicker.
Thanks!
You need to define your exact requirement here - what is that you want adjusting focus observer for? As the name suggests, it is a way to signal you that AVCaptureDevice (reference to "real" device - one of these devices) is adjusting its focus. UIImagePicker is nothing but a file open dialog, not a real device. It works on top of either camera or static list of image files. While in camera mode, you can observe adjustingFocus.
In case that is your requirement, here is nearest you can refer to.
Refer to UIImagePickerController documentation to define how you can implement this for your own needs.

Custom ios camera shutter

Is there any ready custom iris/shutter view for ios camera?
I'm going to implement camera app using AVFoundataion, and there is no shutter in it.
Nope, if you are purely using AVFoundation for capture, you need to build it yourself.
The alternative is using UIImagePickerController with a custom cameraOverlayView if your camera app is simple enough.
But UImagePickerController is not working correctly .because shutter is not opening in interrupted call or background apps.

Resources