【发布时间】:2017-10-26 09:26:44
【问题描述】:
我正在使用AVCaptureSession 和AVCapturePhotoOutput 从设备的相机中以kCVPixelFormatType_14Bayer_RGGB 格式捕获原始照片数据。
我已经在AVCapturePhotoCaptureDelegate 回调中获取原始照片样本缓冲区:
func capture(captureOutput: AVCapturePhotoOutput,
didFinishProcessingRawPhotoSampleBuffer rawSampleBuffer: CMSampleBuffer?,
previewPhotoSampleBuffer: CMSampleBuffer?,
resolvedSettings: AVCaptureResolvedPhotoSettings,
bracketSettings: AVCaptureBracketedStillImageSettings?,
error: Error?) {
guard let rawSampleBuffer = rawSampleBuffer else { return }
guard let pixelBuffer = CMSampleBufferGetImageBuffer(rawSampleBuffer) else { return }
}
我现在正在尝试按照this question 的答案从CVPixelBufferRef 获取像素值,但是当使用 14 位 Bayer RGGB 像素格式而不是 32 位 RGB 格式时,我无法弄清楚如何做到这一点答案中提到。
【问题讨论】:
-
你找到答案了吗?
-
我没有得到任何答案
标签: ios image-processing cvpixelbuffer