使用NDK在Android的实时图像处理 [英] Real Time Image Processing in Android using the NDK

查看:484
本文介绍了使用NDK在Android的实时图像处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Android(2.3.3)的电话,我可以用相机来检索preVIEW与在previewFrame(byte []的数据,摄像头摄像头)方法得到的YUV图像。

Using an Android (2.3.3) phone, I can use the camera to retrieve a preview with the onPreviewFrame(byte[] data, Camera camera) method to get the YUV image.

对于一些图像处理,我需要这个数据转换为RGB图像,并显示在设备上。使用基本的Java / Android的方法,这将运行在不到5 fps的可怕速度...

For some image processing, I need to convert this data to an RGB image and show it on the device. Using the basic java / android method, this runs at a horrible rate of less then 5 fps...

现在,使用NDK,我要加快速度。现在的问题是:如何将YUV数组转换为RGB阵列在C中?而且是有办法(使用OpenGL吧?)在本地code来显示呢?实时应该是可能的(高通公司AR演示向我们展示了这一点)。

Now, using the NDK, I want to speed things up. The problem is: How do I convert the YUV array to an RGB array in C? And is there a way to display it (using OpenGL perhaps?) in the native code? Real-time should be possible (the Qualcomm AR demos showed us that).

我不能使用 setTargetDisplay ,并把覆盖就可以了!

I cannot use the setTargetDisplay and put an overlay on it!

我知道Java的,最近开始了Android SDK,并有C语言零经验

I know Java, recently started with the Android SDK and have zero experience in C

推荐答案

你有没有考虑使用的OpenCV的Andr​​oid端口?它可以做很多事情不仅仅是色彩转换,这是相当快的。

Have you considered using OpenCV's Android port? It can do a lot more than just color conversion, and it's quite fast.

这篇关于使用NDK在Android的实时图像处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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