The ZegoEffects SDK provides various face shape retouch features, including face slimming, eyes enlarging, mouth shape adjustment, teeth whitening, and more.
Before you begin to use the SDK's face shape retouch features in your project, make sure you complete the following steps:
In general, take the following steps to implement a face shape retouch feature:
For this feature to work correctly, you need to import the related model files first. For details, see Import models.
Call the enableBigEyes
method to enable the eyes enlarging feature.
Call the setBigEyesParam
method to set the extent 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.
// Enable the eyes enlarging feature.
mEffects.enableBigEyes(true);
// Set the extent of eyes enlarging. The value range is [0, 100], and the default value is 50.
ZegoEffectsBigEyesParam param = new ZegoEffectsBigEyesParam();
param.intensity = 100;
mEffects.setBigEyesParam(param);
For this feature to work correctly, you need to import the related model files first. For details, see Import models.
Call the enableFaceLifting
method to enable the face slimming feature.
Call the setFaceLiftingParam
method to set the extent 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.
// Enable the face slimming feature.
mEffects.enableFaceLifting(true);
// Set the extent of face slimming. The value range is [0, 100], and the default value is 50.
ZegoEffectsFaceLiftingParam param = new ZegoEffectsFaceLiftingParam();
param.intensity = 100;
mEffects.setFaceLiftingParam(param);
Call the enableSmallMouth
method to enable the mouth shape adjustment feature.
Call the setSmallMouthParam
method to set the extent 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.
// Enable the mouth shape adjustment feature.
mEffects.enableSmallMouth(true);
// Set the extent of mouth shape adjustment. The value range is [-100, 100], and the default value is 50.
ZegoEffectsSmallMouthParam param = new ZegoEffectsSmallMouthParam();
param.intensity = 100;
mEffects.setSmallMouthParam(param);
Call the enableEyesBrightening
method to enable the eyes brightening feature.
Call the enableEyesBrightening
method to set the extent 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.
// Enable the eyes brightening feature.
mEffects.enableEyesBrightening(true);
// Set the extent of eyes brightening. The value range is [0, 100], and the default value is 50.
ZegoEffectsEyesBrighteningParam param = new ZegoEffectsEyesBrighteningParam();
param.intensity = 100;
mEffects.setEyesBrighteningParam(param);
Call the enableNoseNarrowing
method to enable the nose slimming feature.
Call the setNoseNarrowingParam
method to set the extent 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.
// Enable the nose slimming feature.
mEffects.enableNoseNarrowing(true);
// Set the extent of nose slimming, The value range is [0, 100], and the default value is 50.
ZegoEffectsNoseNarrowingParam param = new ZegoEffectsNoseNarrowingParam();
param.intensity = 100;
mEffects.setNoseNarrowingParam(param);
For this feature to work correctly, you need to import the related resource files first. For details, see Import resources.
Call the enableTeethWhitening
method to enable the teeth whitening feature.
Call the setTeethWhiteningParam
method to set the extent 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.
// Enable the teeth whitening feature.
mEffects.enableTeethWhitening(true);
// Set extent of teeth whitening. The value range is [0, 100], and the default value is 50.
ZegoEffectsTeethWhiteningParam param = new ZegoEffectsTeethWhiteningParam();
param.intensity = 100;
mEffects.setTeethWhiteningParam(param);
Call the enableLongChin
method to enable the chin slimming feature.
Call the setLongChinParam
method to set the extent of chin slimming.
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 slimmer.
// Enable the chin slimming feature.
mEffects.enableLongChin(true);
// Set the extent of chin slimming. The value range is [0, 100], and the default value is 50.
ZegoEffectsLongChinParam param = new ZegoEffectsLongChinParam();
param.intensity = 100;
mEffects.setLongChinParam(param);
Call the enableForeheadShortening
method to enable the forehead shortening feature.
Call the setForeheadShorteningParam
method to set the intensity.
The value range of the intensity
property of the ZegoEffectsForeheadShorteningParam
is [-100, 100], and the default value is 50. The value gets larger, the forehead gets shorter.
// Enable the forehead shortening feature.
mEffect.enableForeheadShortening(true);
// Set the intensity, the value range is [-100, 100], and the default value is 50.
ZegoEffectsForeheadShorteningParam param = new ZegoEffectsForeheadShorteningParam();
param.intensity = 100;
mEffects.setForeheadShorteningParam(param);
Call the enableMandibleSlimming
method to enable the mandible slimming feature.
Call the setMandibleSlimmingParam
method to set the intensity.
The value range of the intensity
property of the ZegoEffectsMandlbleSlimmingParam
is [0, 100], and the default value is 50. The value gets larger, the mandible gets slimmer.
// Enable the mandible slimming feature.
mEffect.enableMandibleSlimming(true);
// Set the intensity, the value range is [0, 100], and the default value is 50.
ZegoEffectsMandibleSlimmingParam param = new ZegoEffectsMandibleSlimmingParam();
param.intensity = 100;
mEffects.setMandibleSlimmingParam(param);
Call the enableCheekboneSlimming
method to enable the cheekbone sliming feature.
Call the setCheekboneSlimmingParam
method to set the intensity.
The value range of the intensity
property of the ZegoEffectsCheekboneSlimmingParam
is [0, 100], and the default value is 50. The value gets larger, the cheekbone gets slimmer.
// Enable the cheekbone sliming feature.
mEffect.enableCheekboneSlimming(true);
// Set the intensity, the value range is [0, 100], and the default value is 50.
ZegoEffectsCheekboneSlimmingParam param = new ZegoEffectsCheekboneSlimmingParam();
param.intensity = 100;
mEffects.setCheekboneSlimmingParam(param);
Call the enableFaceShortening
method to enable the face shortening feature.
Call the setFaceShorteningParam
method to set the intensity.
The value range of the intensity
property of the ZegoEffectsFaceShorteningParam
is [0, 100], and the default value is 50. The value gets larger, the face gets shorter.
// Enable the face shortening feature.
mEffect.enableFaceShortening(true);
// et the intensity, the value range is [0, 100], and the default value is 50.
ZegoEffectsFaceShorteningParam param = new ZegoEffectsFaceShorteningParam();
param.intensity = 100;
mEffects.setFaceShorteningParam(param);
Call the enableNoseLengthening
method to enable the nose lengthening feature.
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 lengthened.
// Enable the nose lengthening feature.
mEffect.enableNoseLengthening(true);
// Set the intensity, the value range is [-100, 100], and the default value is 50.
ZegoEffectsNoseLengtheningParam param = new ZegoEffectsNoseLengtheningParam();
param.intensity = 100;
mEffects.setNoseLengheningParam(param);