Agora provides an image enhancement API for users in social and entertainment scenarios to improve their appearance in a video call or interactive live video streaming. With this API, users can adjust settings such as the image contrast, brightness, sharpness, and red saturation, as shown in the following figure:
setBeautyEffectOptions method to flexibly add image enhancement features.
This method has two parameters:
enabled: sets whether or not to enable image enhancement.
options: sets the image enhancement options, including
lighteningContrastLevelfor adjusting the contrast level,
lighteningfor adjusting the brightness level,
smoothnessfor adjusting the sharpness level, and
rednessfor adjusting the red saturation level.
mRtcEngine.setBeautyEffectOptions(true, new BeautyOptions(LIGHTENING_CONTRAST_NORMAL, 0.5F, 0.5F, 0.5F));
We also provide an open-source OpenLive-Android demo project that implements image enhancement on GitHub. You can go to the repository to download it. You can try the demo and refer to the source code of the
onBeautyClicked method in the