I'm working on getting a raw image from avfoundation. I have a understanding of general pipeline of digital image.
- image sensor
- bayer filter
- demosaicing.
My goal is getting a image as raw as possible.
I found out that using avcaptureoutput, if device support raw pixel format, I get output as raw format in callback function(func photoOutput(_ output: AVCapturePhotoOutput, didFinishCaptureFor resolvedSettings: AVCaptureResolvedPhotoSettings, error: Error?))
but what is difference between CMSampleBuffer(in avvideodataout callback function) and output(in avphotooutput callback function)
this is my guess..
-
cmsamplebuffer is image buffer which after all 1,2,3 step(after demosaicing)
-
output from avphotooutput callback function(with raw format supported) is after step 1-2(after bayer filter)
is this right?
God, this really makes my head shaking... Somebody help :(