0

Can anyone tell me if it is possible to capture data from the camera on the iPhones that has never been compressed?

I know that using the AVFoundation framework you can specify the key kCVPixelBufferPixelFormatTypeKey as kCVPixelFormatType_32BGRA and I have done this, but in examing the resulting files, it looks to me like this is just telling the framework to store frame data in BGRA format in the buffer instead of the JPEG format. It appears that the actual data is coming from the compression type specified and is simply JPEG data that has been decompressed into a buffer. When I photograph a text document there are JPEG artifacts surrounding characters. Can anyone tell me if there is a way to specify a non-compressed setting as the compression type or if there is some other method for accessing direct camera output that has never gone through a lossy compression process?

Tony Sullivan
  • 45
  • 1
  • 9
  • I don't know that I've seen artifacts like this when grabbing the image buffers using code like I have here: http://stackoverflow.com/a/11615472/19679 . Do you still see these artifacts when pulling the camera frames as YUV? The original output of YUV 4:2:2 frames does lose a little bit of fidelity, but we don't have access to the raw data to do our own Bayer interpolation, so that's the best we can achieve. – Brad Larson Aug 30 '12 at 16:24

1 Answers1

1

Yes, it's possible, and it's done in the way you appear to be doing it (and as described by Brad Larson in his comment).

The data in question has not been compressed. However, that doesn't mean it is necessarily top-quality.

The "artefacts" you are seeing are most probably sensor noise (iPhone camera sensors are small and tend towards noise at the best of times, and the higher the ISO, the noisier they get—fast!). Plus, while the image has not been compressed, the original RAW data has been through Beyer interpolation as well as such processing as white balance adjustment, ISO amplification (if needed) and, it appears, a degree of sharpening.

Wildaker
  • 2,533
  • 1
  • 17
  • 19