与AVCapureSessions
玩周围,并试图显示输出以不同的方式CMSampleBufferRef
“s(使用AVCaptureVideoPreviewLayer
,显示CGImage
并将它转换到UIImage
),我也看了所有的不同质量预设,你可以为你AVCaptureSession
设置。
然后我注意到为什么AVCaptureSessionPresetHigh的图片如此黑暗?
AVCaptureSessionPresetLow
之间的质量差异,AVCaptureSessionPresetMedium
和AVCaptureSessionPresetHigh
如何不仅是图像的分辨率也是其长宽比和最引人注目的是整体图像质量。在我的具体情况下,使用AVCaptureSessionPresetLow/Medium
获得的帧比使用AVCaptureSessionPresetHigh
的帧要明亮得多。为什么是这样?
为了建立会话,并显示我用这个代码的图像:http://www.benjaminloulier.com/posts/ios4-and-direct-access-to-the-camera
要设置的预置值:
[self.captureSession setSessionPreset:AVCaptureSessionPresetHigh];
在这里与Medium
两个例子和High
质量:
我向你保证,这两个截图是在相同的地点,相同的时间和相同的光线条件下指向相机。