Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: apply OpenGL effects to camera

Is there any way in Android to use a GLSurfaceView to display the camera preview, while using OpenGL effects on that surface? Specifically additive blending effects. I know OpenGL can use the effects, and I know the camera can be placed on a SurfaceView, but can a camera be placed in a GLSurfaceView and have OpenGL blending effects applied to that camera preview?

like image 953
Patrick D Avatar asked May 25 '11 19:05

Patrick D


1 Answers

You can use camera preview to get the raw pixels of camera frames, then upload it to a texture, and then you can do any effects you want. Try looking at this: Android Camera OpenGL ES Tutorial (android camera support is quite buggy though, it almost never works when used this way).

like image 193
the swine Avatar answered Nov 05 '22 07:11

the swine