iPhone上的UIImagePickerController和AVCaptureSession之间的相机差异 [英] Camera differences between UIImagePickerController and AVCaptureSession on iPhone
问题描述
我尝试使用 AVCaptureSession $ c $>替
UIImagePickerController
c> 和 AVCaptureStillImageOutput
I'm trying to build a replacement for UIImagePickerController
, using AVCaptureSession
with AVCaptureDeviceInput
and AVCaptureStillImageOutput
, as input/output respectively.
要预览相机流,我使用 AVCaptureVideoPreviewLayer
强>。
To preview the camera stream I'm using AVCaptureVideoPreviewLayer
.
它现在可以像捕获和存储照片一样正常工作。
It's now working correctly for capturing and storing photos just like the default camera.
问题我无法解决:
- 拍摄的照片的质量与默认照相机不同
- 无法控制相机特定选项(例如闪光灯)
有任何方法可以使用更定制的方法到达 UIImagePickerController
( AVFoundation
或任何其他)?
Is there any way to get to the level of UIImagePickerController
using a more customizable approach (i.e. AVFoundation
or any other)?
推荐答案
409 - 使用相机与AV基金会的 WWDC 2010视频。根据视频, 就像您可以用 AVFoundation
解决所有三个问题。
Check out "Session 409 - Using the Camera with AV Foundation" in the WWDC 2010 videos. Based on the video, it looks like you can resolve all three of your issues with AVFoundation
.
希望这有助于!
这篇关于iPhone上的UIImagePickerController和AVCaptureSession之间的相机差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!