简体   繁体   English

如何设置Open GLES2.0与Android Camera一起使用?

[英]How to Set the Open GLES2.0 to work with the Android Camera?

In My Android Camera Application i want to Set some Effect on the Android Camera Preview witht the Help of OPEN GL vertex shader and fragment shader. 在“我的Android相机应用程序”中,我想在OPEN GL顶点着色器和片段着色器的帮助下对Android Camera Preview设置一些效果。

Is there any example or source code to use the Android camera with Open GLES effect ? 是否有示例或源代码可将Android相机用于Open GLES效果? ?

I have seen this . 我已经看到 But I want android camera effect in Only One SurfaceView not on another. 但我希望Android Camera效果仅在一个SurfaceView中而不是另一个上。

Thanks. 谢谢。

I've done something similar. 我做了类似的事情。 But the code is quite messy, it was just a prototype. 但是代码很混乱,它只是一个原型。 Check it on my github https://github.com/Jaa-c/PDA-Lupa/tree/master/src/pda/lupa . 在我的github https://github.com/Jaa-c/PDA-Lupa/tree/master/src/pda/lupa上检查它。 Preview from the camera is displayed via OpenGL in MyGLSurfaceView, but only in greyscale, because it's to slow to convert colors. 通过OpenGL在MyGLSurfaceView中显示来自相机的预览,但仅以灰度显示,因为转换颜色的速度很慢。 But it doesn't use shaders, since it was using only ES 1.1. 但是它不使用着色器,因为它仅使用ES 1.1。

Than there is one of my answers on similar topic here: Apply custom filters to camera output . 在这里,我对类似主题的答案之一是: 将自定义滤镜应用于相机输出 It descibes some possible ways to manually display camera preview in android. 它描述了一些在Android中手动显示相机预览的可能方法。

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

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