Modify And Update Camera Frame Via Glsurfaceview
I am working with a GLSurfaceView activity to display the camera frame on an android device. As I am newb in OpenGl Es, I wondered how I can get the image buffer and modify it, the
Solution 1:
As fadden explained, you cannot change the preview buffer that is connected to SurfaceTexture. But you can obtain the preview buffers with onPreviewFrame()
, modify it and push the result to OpenGL via glTexSubImage2D()
. There are two pitfalls: you should hide the actual preview (probably connecting it to a texture that will not be visible on your GL surface), and you should do all processing fast enough (20 FPS at least for the "preview" to look natural).
Post a Comment for "Modify And Update Camera Frame Via Glsurfaceview"