Raw image data from camera like “645 PRO”

后端 未结 4 1428
庸人自扰
庸人自扰 2020-11-30 05:09

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

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 05:58

    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.

提交回复
热议问题