Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add real time filtering effects in camera 2 API in Android

I am developing a camera application in android, i want to enable real time filtering effects feature in to my app,I have used GPUimage filter to add filtering effects to an image.But i don't know how to enable real time filtering effects to camera preview before taking a picture.I have used camera and camera 2 api for below lollipop version and for lollipop version.Any library is available for this ?? I am a beginner,Can anyone help?

like image 234
Jack Avatar asked Nov 24 '15 11:11

Jack


1 Answers

If you need simple filters like sepia or negative you can just set CONTROL_EFFECT_MODE field in CaptureRequest instance via CaptureRequest.Builder method mBuilder.set(CaptureRequest.CONTROL_EFFECT_MODE, /*your value*/);

see developers doc for available values.

like image 115
RevakoOA Avatar answered Oct 23 '22 05:10

RevakoOA