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:


Before proceeding, ensure that you have implemented basic real-time functions in your project. See Start a Call or Start Live Interactive Streaming for details.

Call the 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 lighteningContrastLevel for adjusting the contrast level, lighteningLevel for adjusting the brightness level, smoothnessLevel for adjusting the sharpness level, and rednessLevel for adjusting the red saturation level.

Sample code

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.