A time ago I already asked this question and I also got a good answer:
I\'ve been searching this forum up and down but I couldn\'t find what I reall
While the core of the answer comes from Brad at iOS: Get pixel-by-pixel data from camera, a key element is completely unclear from Brad's reply. It's hidden in "once you have your capture session configured...".
You need to set the correct outputSettings for your AVCaptureStillImageOutput
.
For example, setting kCVPixelBufferPixelFormatTypeKey
to kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
will give you a YCbCr imageDataSampleBuffer
in captureStillImageAsynchronouslyFromConnection:completionHandler:
, which you can then manipulate to your heart's content.