How to use CameraX to add OpenGL filters when implementing preview

1,873 views
Skip to first unread message

jialiang li

unread,
Apr 9, 2020, 10:38:07 PM4/9/20
to Android CameraX Discussion Group
As the title describes, I hope that when implementing the preview, it is convenient to add the filter of OpenGL. 

Can give me some help? Thank you very much.

LINGA venkatesh

unread,
Apr 10, 2020, 3:28:20 AM4/10/20
to Android CameraX Discussion Group
+1

We have a similar requirement as well!

Regards,
Venkatesh.

Trevor McGuire

unread,
Apr 14, 2020, 2:48:22 PM4/14/20
to Android CameraX Discussion Group, l.venk...@gmail.com
I am currently finishing up a sample for rendering the camera frames from CameraX using OpenGL. It should be fairly easy to adapt this sample to include your own OpenGL filters. 

However, it would be great to hear what types of filter you would want to use/are currently using.

Yossi Elkrief

unread,
Apr 20, 2020, 1:42:54 PM4/20/20
to Android CameraX Discussion Group, l.venk...@gmail.com
+1 on OpenGL. 
I would love to have a usecase built where we can get the frames pass to Open GL as preview and also have a way to change the frames before GL draw. 
For example drawing outlines around faces or changing hue, BW filter etc. 

박수한

unread,
Apr 21, 2020, 7:13:46 PM4/21/20
to Android CameraX Discussion Group, l.venk...@gmail.com
Thank you for your efforts. Is there a timeline of the sample? 

2020년 4월 15일 수요일 오전 3시 48분 22초 UTC+9, Trevor McGuire 님의 말:

Filip Larsson

unread,
Jun 23, 2020, 3:35:59 AM6/23/20
to Android CameraX Discussion Group, l.venk...@gmail.com
Hi, I was wondering how it's going with your sample :)
This is something that I would really like to read how to do with CameraX.

I'm currently having some negative, black and white, and some other filters. One of the filters I can change some tone colors in real time with a slider.

Thanks!

Scott Nien

unread,
Jun 23, 2020, 5:42:40 AM6/23/20
to Filip Larsson, Android CameraX Discussion Group, LINGA venkatesh

The OpenGL sample is already in AOSP androidX repository.    Please try it out.     it is not in github so you might need to change the build.gradle to build the project.   
https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/camera/integration-tests/coretestapp/src/main/java/androidx/camera/integration/core/OpenGLActivity.java




--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/71739cd6-d1ff-495d-b454-b38e9df32f8bo%40android.com.
Message has been deleted

Yossi Elkrief

unread,
Jun 23, 2020, 7:21:16 AM6/23/20
to Android CameraX Discussion Group, lat...@gmail.com, l.venk...@gmail.com
I got it working. 
This is the github sample repo

Scott Nien

unread,
Jun 24, 2020, 2:42:23 AM6/24/20
to Yossi Elkrief, Android CameraX Discussion Group, Filip Larsson, LINGA venkatesh
Nice !   
Thanks for sharing it to the group.   

On Tue, Jun 23, 2020 at 7:21 PM Yossi Elkrief <elkr...@gmail.com> wrote:
I got it working. 
This is the github sample repo

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
Reply all
Reply to author
Forward
0 new messages