logo
On this page

Shape retouch


The ZegoEffects SDK provides various face shape retouch features, including face slimming, eyes enlarging, mouth shape adjustment, teeth whitening, and more.

Prerequisites

Before you begin to use the SDK's face shape retouch features in your project, make sure you complete the following steps:

  1. Integrate the ZegoEffects SDK into your project. For details, see Integrate the SDK.
  2. Implement the basic image processing functionality. For details, see Implement basic image processing.

Implementation steps

In general, take the following steps to implement a face shape retouch feature:

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

Eyes enlarging

Warning

For this feature to work correctly, you need to import the FaceDetectionModel model files first. For details, see Import resources and models.

  1. Call the enableBigEyes method to enable the eyes enlarging feature.

  2. Call the setBigEyesParam method to set the intensity of eyes enlarging.

    The value range of the intensity property of ZegoEffectsBigEyesParam is [0, 100], and the default value is 50. As this value gets larger, the eyes get bigger.

Untitled
// Enable the eyes enlarging feature. 
mEffects.enableBigEyes(true);

// Set the intensity of eyes enlarging. The value range is [0, 100], and the default value is 50

mEffects.setBigEyesParam({ intensity: 100 });
123456
Copied!

Face sliming

Warning

For this feature to work correctly, you need to import the FaceDetectionModel model files first. For details, see Import resources and models.

  1. Call the enableFaceLifting method to enable the face slimming feature.

  2. Call the setFaceLiftingParam method to set the intensity of face slimming.

    The value range of the intensity property of ZegoEffectsFaceLiftingParam is [0, 100], and the default value is 50. As this value gets larger, the face gets slimmer.

Untitled
// Enable the face slimming feature.
mEffects.enableFaceLifting(true);

// Set the intensity of face slimming. The value range is [0, 100], and the default value is 50

mEffects.setFaceLiftingParam({ intensity: 100 });
123456
Copied!

Mouth shape adjustment

  1. Call the enableSmallMouth method to enable the mouth shape adjustment feature.

  2. Call the setSmallMouthParam method to set the intensity of mouth shape adjustment.

    The value range of the intensity property of ZegoEffectsSmallMouthParam is [-100, 100], and the default value is 50. As this value gets larger, the mouth gets smaller.

Untitled
// Enable the mouth shape adjustment feature.
mEffects.enableSmallMouth(true);

// Set the intensity of mouth shape adjustment. The value range is [-100, 100], and the default value is 50

mEffects.setSmallMouthParam({ intensity: 100 });
123456
Copied!

Eyes brightening

  1. Call the enableEyesBrightening method to enable the eyes brightening feature.

  2. Call the setEyesBrighteningParam method to set the intensity of eyes brightening.

    The value range of the intensity property of ZegoEffectsEyesBrighteningParam is [0, 100], and the default value is 50. As this value gets larger, the eyes get brighter.

Untitled
// Enable the eyes brightening feature.
mEffects.enableEyesBrightening(true);

// Set the intensity of eyes brightening. The value range is [0, 100], and the default value is 50

mEffects.setEyesBrighteningParam({ intensity: 100 });
123456
Copied!

Nose sliming

  1. Call the enableNoseNarrowing method to enable the nose slimming feature.

  2. Call the setNoseNarrowingParam method to set the intensity of nose slimming.

    The value range of the intensity property of ZegoEffectsNoseNarrowingParam is [0, 100], and the default value is 50. As this value gets larger, the nose gets slimmer.

Untitled
// Enable the nose slimming feature.
mEffects.enableNoseNarrowing(true);

// Set the intensity of nose slimming. The value range is [0, 100], and the default value is 50

mEffects.setNoseNarrowingParam({ intensity: 100 });
123456
Copied!

Teeth whitening

Warning

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

  1. Call the enableTeethWhitening method to enable the teeth whitening feature.

  2. Call the setTeethWhiteningParam method to set the intensity of teeth whitening.

    The value range of the intensity property of ZegoEffectsTeethWhiteningParam is [0, 100], and the default value is 50. As this value gets larger, the teeth get whiter.

Untitled
// Enable the teeth whitening feature.
mEffects.enableTeethWhitening(true);

// Set the intensity of teeth whitening. The value range is [0, 100], and the default value is 50

mEffects.setTeethWhiteningParam({ intensity: 100 });
123456
Copied!

Chin lengthening

  1. Call the enableLongChin method to enable the chin lengthening feature.

  2. Call the setLongChinParam method to set the intensity of chin lengthening.

    The value range of the intensity property of ZegoEffectsLongChinParam is [0, 100], and the default value is 50. As this value gets larger, the chin gets longer.

Untitled
// Enable the chin lengthening feature.
mEffects.enableLongChin(true);

// Set the extent of chin lengthening. The value range is [0, 100], and the default value is 50

mEffects.setLongChinParam({ intensity: 100 });
123456
Copied!

Forehead shortening

  1. Call the enableForeheadShortening method to enable the forehead shortening feature.

  2. Call the setForeheadShorteningParam method to set the intensity.

    The value range of the intensity property of ZegoEffectsForeheadShorteningParam is [-100, 100], and the default value is 50. The value gets larger, the forehead gets shorter.

Untitled
// Enable the forehead shortening feature.
mEffect.enableForeheadShortening(true);

// Set the intensity, the value range is [-100, 100], and the default value is 50.
mEffects.setForeheadShorteningParam({ intensity: 100 });
12345
Copied!

Mandible slimming

  1. Call the enableMandibleSlimming method to enable the mandible slimming feature.

  2. Call the setMandibleSlimmingParam method to set the intensity.

    The value range of the intensity property of ZegoEffectsMandibleSlimmingParam is [0, 100], and the default value is 50. The value gets larger, the mandible gets slimmer.

Untitled
// Enable the mandible slimming feature.
mEffect.enableMandibleSlimming(true);

// Set the intensity, the value range is [0, 100], and the default value is 50.
mEffects.setMandibleSlimmingParam({ intensity: 100 });
12345
Copied!

Cheekbone slimming

  1. Call the enableCheekboneSlimming method to enable the cheekbone sliming feature.

  2. Call the setCheekboneSlimmingParam method to set the intensity.

    The value range of the intensity property of ZegoEffectsCheekboneSlimmingParam is [0, 100], and the default value is 50. The value gets larger, the cheekbone gets slimmer.

Untitled
// Enable the cheekbone sliming feature.
mEffect.enableCheekboneSlimming(true);

// Set the intensity, the value range is [0, 100], and the default value is 50.
mEffects.setCheekboneSlimmingParam({ intensity: 100 });
12345
Copied!

Face shortening

  1. Call the enableFaceShortening method to enable the face shortening feature.

  2. Call the setFaceShorteningParam method to set the intensity.

    The value range of the intensity property of ZegoEffectsFaceShorteningParam is [0, 100], and the default value is 50. The value gets larger, the face gets shorter.

Untitled
// Enable the face shortening feature.
mEffect.enableFaceShortening(true);

// Set the intensity, the value range is [0, 100], and the default value is 50.
mEffects.setFaceShorteningParam({ intensity: 100 });
12345
Copied!

Nose lengthening

  1. Call the enableNoseLengthening method to enable the nose lengthening feature.

  2. Call the setNoseLengtheningParam method to set the intensity.

    The value range of the intensity property of the ZegoEffectsNoseLengtheningParam is [-100, 100], and the default value is 50. The value gets larger, the nose gets more lengthened.

Untitled
// Enable the nose lengthening feature.
mEffect.enableNoseLengthening(true);

// Set the intensity, the value range is [-100, 100], and the default value is 50.
mEffects.setNoseLengtheningParam({ intensity: 100 });
12345
Copied!

Previous

Face Beautification

Next

Makeups