logo
On this page

Face beautification


The ZegoEffects SDK provides various face beautification features that help users look like their best selves on live video, including skin tone enhancement, skin smoothing, cheek blusher, image sharpening, and more.

Prerequisites

Before using the ZegoEffects SDK face beautification features, please ensure:

Implementation steps

In general, take the following steps to use a face beautification feature:

  1. Enable the feature.
  2. Specify the parameters of the beautification feature as needed. If not specified, the SDK uses the default settings.

Skin tone enhancement

Use this feature to make the skin tone whiter or tanner.

To use the skin tone enhancement feature, import the related resource file FaceWhiteningResources first; otherwise, this feature can't take effect. For details, see Import resources and models.

  1. Call the enableWhiten method to enable the skin tone enhancement feature.

  2. Call the setWhitenParam method to set the intensity.

    The value range of the intensity property of ZegoEffectsWhitenParam is [0, 100], and the default value is 50. As this value gets larger, the skin tone gets whiter.

Untitled
// Enable skin tone enhancement
mEffects.enableWhiten(true);
// Set enhancement intensity, range [0, 100], default is 50
mEffects.setWhitenParam({ intensity: 100 });
1
Copied!

Skin smoothing

  1. Call the enableSmooth method to enable the skin smoothing feature.

  2. Call the setSmoothParam method to set the smoothing intensity.

    The value range of the intensity property of ZegoEffectsSmoothParam is [0, 100], and the default value is 50. As this value gets larger, the skin looks smoother.

Untitled
// Enable skin smoothing
mEffects.enableSmooth(true);
// Set smoothing intensity, range [0, 100], default is 50
mEffects.setSmoothParam({ intensity: 100 });
1
Copied!

Cheek blusher

For this feature to work correctly, you need to import the related resource files first. For details, see Import resources.

  1. Call the enableRosymethod to enable the cheek blusher feature.

  2. Call the setRosyParam interface to set the rosy intensity.

The value range of the intensity property of ZegoEffectsRosyParam is [0, 100], and the default value is 50. As this value gets larger, the cheek gets rosier.

Untitled
// Enable cheek blusher
mEffects.enableRosy(true);
// Set blusher intensity, range [0, 100], default is 50
mEffects.setRosyParam({ intensity: 100 });
1
Copied!

Image sharpening

  1. Call the enableSharpen method to enable the image sharpening feature.

  2. Call the setSharpenParam method to set the sharpening strength.

    The value range of the intensity property of ZegoEffectsSharpenParam is [0, 100], and the default value is 50. As this value gets larger, the image looks sharper.

Untitled
// Enable image sharpening
mEffects.enableSharpen(true);
// Set sharpening intensity, range [0, 100], default is 50
mEffects.setSharpenParam({ intensity: 100 });
1
Copied!

Nasolabial folds removing

  1. Call the enableWrinklesRemoving method to enable the nasolabial folds removing feature.

  2. Call the setWrinklesRemovingParam to set the intensity.

    The value range of the intensity property of the ZegoEffectsWrinklesRemovingParam is [0, 100], and the default value is 50. As this value gets larger, the more thoroughly the nasolabial folds are removed.

Untitled
// Enable nasolabial fold removal feature
mEffects.enableWrinklesRemoving(true);

// Set the degree of nasolabial fold removal, range [0, 100], default is 50
mEffects.setWrinklesRemovingParam({ intensity: 100 });
1
Copied!

Dark circles removing

  1. Call the enableDarkCirclesRemoving method to enable the dark circles removing feature.

  2. Call the setDarkCirclesRemovingParam method to set the intensity.

    The value range of the intensity property of the ZegoEffectsDarkCirclesRemovingParam is [0, 100], and the default value is 50. As this value gets larger, the more thoroughly the dark circles are removed.

Untitled
// Enable dark circles removal feature
mEffects.enableDarkCirclesRemoving(true);

// Set the degree of dark circles removal, range [0, 100], default is 50
mEffects.setDarkCirclesRemovingParam({ intensity: 100 });
1
Copied!

Acne and Spot Removal

Call the enableAcneRemoving interface to enable the acne and spot removal feature, and use the setAcneRemovingParam interface to set the intensity of the acne and spot removal.

The value range of the "intensity" parameter in the ZegoEffectsAcneRemovingParam object is [0, 100], with a default value of "0". A larger value indicates a stronger acne and spot removal effect. Developers can customize the value according to their needs.

Untitled
// Enable acne and freckles removal feature
mEffects.enableAcneRemoving(true);

// Set the degree of acne and freckles removal, range [0, 100], default is 0
mEffects.setAcneRemovingParam({ intensity: 100 });
1
Copied!

Clarity Enhancement

Warning

Before using the clarity enhancement feature, please import the corresponding "ClarityResources" resource files, otherwise the feature will not work. For details, please refer to Quick Starts - Import Resources and Models.

Call the enableClarity interface to enable the clarity enhancement feature, and use the setClarityParam interface to set the clarity level.

The value range of the "intensity" parameter in the ZegoEffectsClarityParam object is [0, 100], with a default value of "0". A larger value indicates a stronger clarity enhancement effect. Developers can customize the value according to their needs.

Untitled
// Enable clarity feature
mEffects.enableClarity(true);

// Set the degree of clarity, range [0, 100], default is 0
mEffects.setClarityParam({ intensity: 100 });
1
Copied!

Skin Color Adjustment

Warning

Before adjusting the skin color, please import and load the corresponding skin resources from "SkinColorResources", otherwise the feature will not work. For details, please refer to Quick Starts - Import Resources and Models.

Call the enableSkinColor interface to enable the skin color adjustment feature, use the setSkinColorResPath interface to load the supported skin resources, and then use the setSkinColorParam interface to set the intensity of the skin color adjustment.

The value range of the "intensity" parameter in the ZegoEffectsSkinColorParam object is [0, 100], with a default value of "0". A larger value indicates a more noticeable change in skin color. Developers can customize the value according to their needs.

Untitled
// Enable skin tone adjustment feature
mEffects.enableSkinColor(true);

// Load the supported/specified skin tone resources
String skinResPath = "SkinColorResources/***";
mEffects.setSkinColorResPath(skinResPath);

// Set the degree of skin tone adjustment, range [0, 100], default is 0;
mEffects.setSkinColorParam({ intensity: 100 });
1
Copied!

Previous

Implement Basic Image Processing

Next

Shape Retouch