Agora provides an image enhancement API for users in social and entertainment scenarios to improve their appearance in a video call or live interactive 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,
lighteningLevelfor adjusting the brightness level,
smoothnessLevelfor adjusting the sharpness level, and
rednessLevelfor adjusting the red saturation level.
bool enabled = true; agora::rtc::BeautyOptions options; options.lighteningContrastLevel = BeautyOptions::LIGHTENING_CONTRAST_NORMAL; options.lighteningLevel = 0.7; options.smoothnessLevel = 0.5; options.rednessLevel = 0.1; m_lpAgoraEngine->setBeautyEffectOptions(enabled, options);
We also provide an open-source demo project OpenLive-Windows on GitHub that implements the image enhancement function.