Android code to add filtering effects using camera

2019-09-11 14:24发布

问题:

I am writing an android camera app using camera2 API. I want to know how to add various filtering effects i.e sepia, negative in android camera surface as a list. Please help to solve the same.

回答1:

You can set CONTROL_EFFECT_MODE like this:

mPreviewRequestBuilder.set(CaptureRequest.CONTROL_EFFECT_MODE, CaptureRequest.CONTROL_EFFECT_MODE_SEPIA);