I am playing with swift and an iPhone 7 Plus. I am working with builtInWideAngleCamera and builtInTelephotoCamera. This is great, even if i cannot get the 2 images simultaneously.
I saw in apple documentation that AVCaptureDeviceType contains a builtInDualCamera entry. What is the purpose of this device in avfoundation, because we cannot do anything (zoom, depth effect) with apple API ?
In other word, i cannot see the difference between builtInDualCamera and builtInWideAngleCamera when working with AVCaptureDeviceType, avcapturesession and stuff
Thanks
Duel-Camera options is to choose the behaviour like Camera app and let the system decide automatically choose which camera to use during capture and can combine data from both cameras to improve output. Also it does not support any RAW photo capture, OIS, HFR and Slo mo.
For more info check iOSDeviceCompatibility
From Documentation:
Dual Camera
Some iOS devices contain a dual camera—two separate back-facing cameras that can work together as a single capture device. When setting up a capture session on a device with an dual camera, you can choose to use only the wide-angle camera, only the telephoto camera, or the dual camera. Choosing the dual camera capture device provides behavior similar to the built-in Camera app—the system automatically chooses which camera to use during capture, and can combine data from both cameras to improve capture output.
The AVCaptureDevice devices and devicesWithMediaType: methods are deprecated in iOS 10 and do not provide access to the dual camera device (instead, they provide only the wide-angle camera device). To determine whether a device contains a dual camera and select it for capture, you may either:
- Call the AVCaptureDevice defaultDeviceWithDeviceType:mediaType:position: method, passing the builtInDuoCamera device type. If this method returns non-nil, the iOS device contains a dual camera. (If this method returns nil, you can call it again, passing the builtInWideAngleCamera device type, to obtain the default back camera.)
- Create an AVCaptureDeviceDiscoverySession object, passing the device attributes you want to use for capture, and enumerate its devices list to choose a device for your capture session.
When you use the dual camera capture device, Optical Image Stabilization (OIS), RAW Photo Capture, High Frame Rate (HFR) / Slow Motion Video, and most manual controls are not available. To use these features, specifically select either the wide or telephoto capture device. (For OIS, specifically select the wide-angle camera; the telephoto camera does not support optical image stabilization.)
builtInDualCamera
is like a "simple mode", automatically switching between wide angle and telephoto seamlessly when zooming.
When capturing video, the ramp
(gradually zooming) can be seamless from 1x to 16x. Whereas handling manually will be much more work and could have lag when switch devices.
来源:https://stackoverflow.com/questions/41482277/what-is-the-role-of-avcapturedevicetype-builtindualcamera