从TotalCaptureResult获取字节[] [英] Get the bytes[] from a TotalCaptureResult
问题描述
我正在使用Android中的Camera2 API从相机获取TotalCaptureResults对象.我正在使用预览,而不是单个图像.有没有办法从TotalCaptureResults中获取bytes []?
I am getting the TotalCaptureResults object from the camera, using the Camera2 API in Android. I am using a preview, not a single image. Is there a way to get bytes[] from TotalCaptureResults?
谢谢.
推荐答案
简短答案:否.
所有CaptureResults
对象仅包含有关帧捕获的元数据,而没有实际的像素信息.关联的像素数据将发送到您在CaptureRequest.Builder
中指定为目标Surface
的任何地方.因此,您需要检查设置的任何Surface
,例如ImageReader
,它将允许您访问摄像机的Image
输出,这将使您可以访问字节[].
All CaptureResults
objects contain only metadata about a frame capture, no actual pixel information. The associated pixel data are sent to wherever you designated as the target Surface
in your CaptureRequest.Builder
. So you need to check with whatever Surface
you set up, such as an ImageReader
which will give you access to an Image
output from the camera, which will give you access to the bytes[].
这篇关于从TotalCaptureResult获取字节[]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!