从TotalCaptureResult获取字节[] [英] Get the bytes[] from a TotalCaptureResult

查看:230
本文介绍了从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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆