简体   繁体   English

在Tango中获取原始RGB或YUV数据缓冲区

[英]Get raw RGB or YUV data buffer in Tango

I'm just started with Tango and Unity, and need to find a way to get raw RGB or YUV data from the device camera in order to pass it further for processing. 我刚开始使用Tango和Unity,需要找到一种从设备相机获取原始RGB或YUV数据的方法,以便将其进一步传递给处理。 This processing requires me to provide either ARGB array or three Y,U,V buffers. 此处理需要我提供ARGB阵列或三个Y,U,V缓冲区。 How shall I approach this? 我该如何处理?

I need something similar to OnTangoImageAvailableEventHandler callback - however, it gives me an array of bytes which is a YUV image and I have no way of getting individual Y,U or V planes, neither strides for each plane. 我需要类似于OnTangoImageAvailableEventHandler回调的内容-但是,它为我提供了一个字节数组,这是YUV图像,并且我无法获取单个Y,U或V平面,对于每个平面都没有跨度。

YUV byte array can be transformed to RGB using function mentioned here: Confusion on YUV NV21 conversion to RGB . 可以使用此处提到的功能将YUV字节数组转换为RGB:将YUV NV21转换为RGB时的困惑 Using that function you can get R, G and B values. 使用该功能,您可以获取R,G和B值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM