Video Call
  • iOS : Objective-C
  • Android
  • Web
  • Flutter
  • React Native
  • Electron
  • Unity3D
  • Cocos Creator
  • Windows
  • macOS
  • Linux
  • Overview
  • Develop your app
    • Integrate the SDK
    • Implement a basic video call
    • Enhance basic feature
      • Use Tokens for authentication
      • Config your video based on scenes
      • Check the room connection status
      • Set up common video config
      • Set up common audio config
  • Best practices
    • Implement a video call for multiple users
  • Upgrade using advanced features
    • Advanced features
      • Configure the video
        • Watermark the video/Take snapshots
        • Improve your appearance in the video
        • Beautify & Change the voice
        • Configure video codec
        • Output the video in H.265
      • Improve video quality
        • Configure bandwidth management
        • Test network and devices in advance
        • Visualize the sound level
        • Monitor streaming quality
      • Message signaling
        • Convey extra information using SEI
        • Broadcast real-time messages to a room
        • Quotas and limits
      • Play media files
        • Play media files
        • Play sound effects
      • Share the screen
      • Mix the video streams
      • Publish multiple video streams
      • Encrypt the video streams
      • Record video media data
    • Distincitve features
      • Join multiple rooms
      • Customize the video and audio
      • Set the voice hearing range
      • Use the bit mask
      • Play streams via URL
      • Play a transparent gift special effect
  • Upgrade using Add-on
  • Resources & Reference
    • SDK
    • Sample codes
    • API reference
      • Client APIs
      • Server APIs
    • Debugging
      • Error codes
      • Logging/Version number
    • FAQs
    • Key concepts
  • Documentation
  • Video Call
  • Upgrade using advanced features
  • Advanced features
  • Configure the video
  • Improve your appearance in the video

Improve your appearance in the video

Last updated:2023-05-17 19:00

Introduction

ZEGOCLOUD’s SDKs provide basic face beautification features such as skin tone enhancement, skin smoothing, cheek blusher, and image sharpening, which are commonly used in video calls and live streaming scenarios, making you look the way you want.

You can enable the basic face beautification features based on your needs and set the intensity as wanted.

The basic face beautification features listed in this document (skin tone enhancement, cheek blusher, skin smoothing, and image sharpening) are provided by the embedded AI Effects SDK in the ZEGOCLOUD Video Call SDK. For more advanced beautification features, see Add video filters with the AI Effects.

Prerequisites

Before you begin, make sure:

  • ZEGO Express SDK has been integrated into the project to implement basic real-time audio and video functions. For details, please refer to Quick start .
  • A project has been created in ZEGOCLOUD Console and applied for a valid AppID and AppSign. For details, please refer to Console - Project Information .

Initialize the face beautification environment

To use the basic face beautification features, call the startEffectsEnv method to initialize the face beautification environment before starting the local video view (startPreview) and publishing streams (startPublishingStream).

After initializing the face beautification environment, the SDK implements the transmission with the default video frame data type. If you need to use the custom video pre-processing feature, you will need to configure the corresponding video frame data type:

/** Create a face beautification environment */
[[ZegoExpressEngine sharedInstance] startEffectsEnv];

Enable the basic face beautification features

There is no particular time order for calling the enableEffectsBeauty method and the setEffectsBeautyParam method.

After initializing the face beautification environment, you can call the enableEffectsBeauty method to enable the face beautification feature you want to use after or before the stream publishing.

/** Enable the basic face beautification features */
[[ZegoExpressEngine sharedInstance] enableEffectsBeauty:true];

Set the intensity for the face beautification features

After initializing the face beautification environment, you can call the setEffectsBeautyParam method to set the intensity as needed after or before the stream publishing.

  • smoothIntensity: Skin smoothing. Smooth the skin while preserving details of the face, such as moles.
  • whitenIntensity: Skin tone enhancement. Turn up the overall brightness to whiten your face.
  • rosyIntensity: Cheek blusher. Carry on the warm color processing to the whole picture.
  • sharpenIntensity: Image sharpening. You can sharpen it slightly to make it clearer when the picture is a little blurry.

The value range for the four features is [0, 100], and the default value is 50. As this value gets larger, the intensity gets stronger.

// Create a parameter object for the face beautification environment.
ZegoEffectsBeautyParam *beautyParam = [[ZegoEffectsBeautyParam alloc] init];

// Skin tone enhancement, cheek blusher, skin smoothing, image sharpening
beautyParam.whitenIntensity = 50;
beautyParam.rosyIntensity = 50;
beautyParam.smoothIntensity = 50;
beautyParam.sharpenIntensity = 50;

/** Set the intensity by specifying the parameter */
[[ZegoExpressEngine sharedInstance] setEffectsBeautyParam:beautyParam];

Destroy the face beautification environment

To disable the face beautification features, set the parameter to false when calling the enableEffectsBeauty method. While the face beautification module still occupies resources.

To destroy the face beautification environment and release the resources it occupies, call the stopEffectsEnv method before the local video preview and stream publishing.

The SDK automatically destroys the face beautification environment when you call the destroyEngine method to destroy the SDK.

/** Destroy the face beautification environment  */
[[ZegoExpressEngine sharedInstance] stopEffectsEnv];
Page Directory