I'm working with AVCaptureSession
for capturing the image. Its working fine
but not giving a good resolution. I compared it with the image captured by iPhone Camera and I found that the iPhone Camera Image is much better than AVCaptureSession
image.
I have seen 3-4 links on stackOverflow about this but could not find any solution.
also I have tried all the presets
AVCaptureSessionPresetPhoto,
AVCaptureSessionPresetHigh,
AVCaptureSessionPresetMedium,
AVCaptureSessionPresetLow,
AVCaptureSessionPreset352x288,
AVCaptureSessionPreset640x480,
AVCaptureSessionPreset1280x720,
AVCaptureSessionPreset1920x1080,
AVCaptureSessionPresetiFrame960x540,
AVCaptureSessionPresetiFrame1280x720,
but still image is of lesser quality. Please let me know if my question is not clear enough or I missed something.
When using the preset AVCaptureSessionPresetPhoto with an AVCaptureStillImageOutput, I'm able to capture images on an iPhone 4S at a resolution of 3268x2448, which is the exact same resolution that the built-in camera application yields. The same is true for the iPhone 4, Retina iPad, etc., so if you use that preset with a still image input, you will get a sample buffer back from -captureStillImageAsynchronouslyFromConnection:completionHandler:
that is the native camera resolution.
In regards to photo quality, remember that the built-in camera application has the ability to capture high-dynamic-range (HDR) photos by the quick acquisition of images at different exposure levels. We do not have access to this via the standard AV Foundation APIs, so all we get is one image at a defined exposure level.
If you turn HDR off, the image quality looks identical to me. Here is a zoomed-in portion of a photo captured using an AVCaptureStillImageOutput:
and here is one from the built-in photo application:
Ignoring the slight differences in lighting due to a little shift in camera direction, the resolution and fidelity of images captured both ways appear to be the same.
I captured the first image using the SimplePhotoFilter example application from my open source GPUImage framework, replacing the default GPUImageSketchFilter with a GPUImageGammaFilter that didn't adjust the gamma any, just acted as a passthrough.