Android - Camera and OpenGL ES - android

i need to create a camera class which draw animation from openGL ES. image which captured from camera will be surfaceholder for image animation from OpenGL.
its like navigation on Wikitude or Layar.
Is there any way to do this?

you can start from make a surfaceView and add a callback to it. this example maybe can help solve your problem
John,

Related

OpenGL on top of camera view

I'm trying to find simple examples of using OpenGL with Camera preview. Help me with code examples.
Luxand FaceSDK contains samples for Android using OpenGL to draw image from camera - you can look at the code.

Circular video player using texture view in android

I have to create a circular video player using textureview in android. I don't have idea how to achieve this. Kindly help.
It's possible to modify the Camera output as you record it, but this has nothing to do with TextureView. You can use a GLES fragment shader or apply a mask bitmap with GLES. Grafika ( github.com/google/grafika ) has some relevant code, but doesn't do what you're specifically asking for
You can achieve by providing overlay of TextureView
here is sample how you can achieve!

Android Camera Live Filter

What is the best way for Camera Live filters. I am recently using GPUImage Library from Link: https://github.com/CyberAgent/android-gpuimagelibrary.
Than I have found SurfaceView and GLSurfaceView.
Problem is:
How to apply live filter to camera using SurfaceView or GLSurfaceView.
Thanks in advance.
This link uses Texture View
https://github.com/google/grafika/blob/master/app/src/main/java/com/android/grafika/LiveCameraActivity.java
This uses surface view to play a movie..u can manipulate it for live camera
https://github.com/google/grafika/blob/master/app/src/main/java/com/android/grafika/PlayMovieSurfaceActivity.java
To choose on whether to use surfaceView or GLSurfaceView
take a look at this
Difference between SurfaceView and GLSurfaceView in Android

Android oval textureview

I have a camerapreview displayed on a textureView which works pretty well. But I can't mask the textureView with a circular mask. As soon as I use masking nothing gets displayed.
Is this not possible? Or is there another way?
You should use the API SurfaceTexture.
render camera frames to a SurfaceTexture created by yourself
draw the frame in the surfaceTexture to screen. During the drawing, you use a specific opengl vertex array to implement round corners.
Here is an very helpful article with source code on github.
https://medium.com/#fabrantes/rounded-video-corners-on-android-3467841cc1b

ImageView Camera preview

Can I set an ImageView to a camerapreview? Instead of using a surfaceview? I'm trying to make a camera preview semi transparent with setAlpha method, but It doesn't work on surfaceview. I mean it does work, but the camera preview is not semi transparent.
Well actually you can but not using SurfaceView. You achieve this by using GLSurface view, where you render each of your frame using shaders. In the fragment shader you can specify the opacity of your video. If you don't know OpenGL ES 2.0 you can start from here http://developer.android.com/training/graphics/opengl/index.html, but there are also many tutorial including rendering frames using opengl.
No you cannot do this, SurfaceView is the only way to create a Camera preview in Android.

Categories

Resources