从 TotalCaptureResult 获取 bytes[]

Get the bytes[] from a TotalCaptureResult

我正在使用 Android 中的 Camera2 API 从相机获取 TotalCaptureResults 对象。我正在使用预览,而不是单个图像。有没有办法从 TotalCaptureResults 中获取 bytes[]?

谢谢。

简答:没有。

所有 CaptureResults 对象仅包含有关帧捕获的元数据,没有实际像素信息。关联的像素数据将发送到您在 CaptureRequest.Builder 中指定为目标 Surface 的任何位置。因此,您需要检查您设置的任何 Surface,例如 ImageReader,这将使您能够访问相机的 Image 输出,这将使您能够访问字节[ ].