如有需要,調用MHBeautyManager里面的相關接口設置美顏參數,參數列表如下:
| 分類 | 功能 |對應函數 |參數范圍 |
| --- | --- | --- | --- |
| 美顏 | 美白 | setSkinWhiting(int progress)| progress: [0,9]|
| 美顏 | 磨皮 |setSkinSmooth(int progress)|progress: [0,9]|
| 美顏 | 紅潤 |setSkinTenderness(int progress)|progress: [0,9]|
|美顏|亮度|setBrightness(int progress)|progress: [0,100 ]|
|美型|大眼|setBigEye(int progress)|progress: [0,100]|
|美型|瘦臉|setFaceLift(int progress)|progress: [0,100]|
|美型|嘴型|setMouseLift(int progress)|progress: [0,100]|
|美型|瘦鼻|setNoseLift(int progress)|progress: [0,100]|
|美型|下巴|setChinLift(int progress)|progress: [0,100]|
|美型|額頭|setForeheadLift(int progress)|progress: [0,100]|
|美型|眉毛|setEyeBrow(int progress)|progress: [0,100]|
|美型|眼角|setEyeCorner(int progress)|progress: [0,100]|
|美型|眼距|setEyeLength(int progress)|progress: [0,100]|
|美型|開眼角|setEyeAlat(int progress)|progress: [0,100]|
|美型|削臉|setFaceShave(int progress)|progress: [0,100]|
|美型|長鼻|setLengthenNoseLift(int progress)|progress: [0,100]|
|貼紙|貼紙|setSticker( final String stickerName, final int action, final boolean show,final boolean isAction,final String key)|stickerName:動作貼紙名稱(使用前需要先獲取動作貼紙列表 然后下載動作貼紙) , action 動作id(0 //無 1 // 抬頭 2 //張嘴 3 //眨眼),show 是否顯示,isAction 是否為動作貼紙,key貼紙分類標識MHConfigConstants.TIE_ZHI_1//基礎貼紙_2//高級貼紙_3//基礎面具_4//高級面具|
|濾鏡|濾鏡|setFilter(final int filterId);|filterId:濾鏡資源id|
|特效 ||setSpeciallyEffect(String speciallyName )|speciallyName 特效名稱 |
|哈哈鏡 ||setDistortionEffect(final int distortionName, final boolean isTeXiao)|distortionName 哈哈鏡名稱 isTeXiao:是否為特效里的哈哈鏡|
|水印 ||setWatermark(Bitmap bitmap, WaterAlignEnum waterAlignEnum)|Bitmap 水印切圖,waterAlignEnum 水印顯示位置(屏幕四角)|
|動作貼紙|2.4.3以后版本生效|setSticker( final String stickerName, final int action, final boolean show,final boolean isAction,final String key)|stickerName:動作貼紙名稱(使用前需要先獲取動作貼紙列表 然后下載動作貼紙) , action 動作id(0 //無 1 // 抬頭 2 //張嘴 3 //眨眼),show 是否顯示,isAction 是否為動作貼紙,key貼紙分類標識MHConfigConstants.TIE_ZHI_1//基礎貼紙_2//高級貼紙_3//基礎面具_4//高級面具
|
|美妝 |2.4.5以后版本生效|setMakeup(int makeupId,boolean enable)|makeupId 美妝類型id(MHSDK.MAKEUP_NONE //無 MHSDK.MAKEUP_LIPSTICK //唇彩 MHSDK.MAKEUP_EYELASH //睫毛 MHSDK.MAKEUP_BLUSH //腮紅),enable 是否開啟|
說明:大眼、瘦臉、嘴型、鼻型、下巴、額頭是基礎和高級版本都可以用,其余美型只能在高級版本才能使用。
*混淆(confuse)*
```
-keep class com.meihu.**{*;}*
```
If necessary, call the relevant interface in MHBeautyManager to set the beauty parameters, the parameter list is as follows:
|classification |function | corresponding to the function| parameters |
| --- | --- | --- | --- |
| beauty | Whitening | setSkinWhiting(int progress)| progress: [0,9]|
| beauty | buffing |setSkinSmooth(int progress)|progress: [0,9]|
| beauty | ruddy |setSkinTenderness(int progress)|progress: [0,9]|
|beauty|luminance|setBrightness(int progress)|progress: [0,100 ]|
|beautiful type|Big eye|setBigEye(int progress)|progress: [0,100]|
|beautiful type|thin face|setFaceLift(int progress)|progress: [0,100]|
|beautiful type|mouth|setMouseLift(int progress)|progress: [0,100]|
|beautiful type|Thin nasal|setNoseLift(int progress)|progress: [0,100]|
|beautiful type|jaw|setChinLift(int progress)|progress: [0,100]|
|beautiful type|forehead|setForeheadLift(int progress)|progress: [0,100]|
|beautiful type|eyebrow|setEyeBrow(int progress)|progress: [0,100]|
|beautiful type|Canthus|setEyeCorner(int progress)|progress: [0,100]|
|beautiful type|Eyes distance|setEyeLength(int progress)|progress: [0,100]|
|beautiful type|open canthus|setEyeAlat(int progress)|progress: [0,100]|
|beautiful type|Cutting face|setFaceShave(int progress)|progress: [0,100]|
|beautiful type| Extended nose|setLengthenNoseLift(int progress)|progress: [0,100]|
|sticker|sticker|setSticker( final String stickerName, final int action, final boolean show,final boolean isAction,final String key)|stickerName:Action sticker name (obtain action sticker list and download action sticker before using), Action action ID (0 // none 1 // head up 2 // open mouth 3 // blink), show whether display, isAction whether action sticker,?MHConfigConstants.TIE\_ZHI\_1// Basic Sticker \_2// Advanced sticker \_3// Basic mask \_4// Advanced Mask|
|filters|filters|setFilter(final int filterId);|filterId:filters id|
|special effects ||setSpeciallyEffect(String speciallyName )|specially Name |
|Distorting mirror & have spent?| | setDistortionEffect (final int distortionName, final Boolean isTeXiao) | distortionName distorting mirror name isTeXiao: whether the distorting mirror for special effects|
|Watermark & have spent?| | setWatermark (Bitmap Bitmap, WaterAlignEnum WaterAlignEnum) | Bitmap watermark cut figure, WaterAlignEnum watermark display position (the corners of the screen)|
|Effective action stickers | 2.4.3 later | setSticker (final String stickerName, final int the action,?Final Boolean show, final Boolean isAction, final String key) | stickerName: action name stickers (need to obtain a list action stickers first before use And then download the stickers),?Action Action ID (0 // none 1 // look up 2 // open mouth 3 // blink), show whether display, isAction whether action sticker,?Key sticker classification identification MHConfigConstants. TIE\_ZHI\_1 based sticker \_2 / / / / advanced stickers based mask \_4 \_3 / / / / advanced mask | beauty makeup & have spent?| | 2.4.5 later takes effect setMakeup (int makeupId, Boolean enable) | makeupId beauty makeup type id (MHSDK. MAKEUP\_NONE / / no MHSDK. MAKEUP\_LIPSTICK / / lip gloss?MAKEUP\_BLUSH // mhsdk. MAKEUP\_BLUSH // eyelash), enable whether to enable|
Description: Big eyes, thin face, mouth, nose, chin, forehead are basic and advanced versions can be used, the rest of the beauty can only be used in advanced versions.
- 一、產品簡介(Product introduction)
- 1.功能說明(Functional Specification)
- 2.平臺支持(Platform support)
- 3.官方鏈接(The official link)
- 二、集成指引(Integrated guidance)
- Android集成指引(Android Integration Guide)
- 1.概述(Overview)
- 2.接入說明(Access instructions)
- 3.詳細步驟(detailed steps)
- 4.具體直播平臺接入(Specific live broadcast platform access)
- 1.騰訊云直播(Tencent Cloud Live)
- 2.阿里云(Alibaba Cloud)
- 三、MHSDK美顏相關接口部分(MHSDK Interface related to beauty)
- Android相關接口文檔說明(Android MHSDK Interface related to beauty)
- 美顏相關接口文檔說明(Description of interfaces related to beauty)
- 四、常見問題(FAQ)
- Android常見問題(Android FAQ)
- 1.認證失敗原因(Cause of authentication failure)
- 2.調用美型、貼紙、特效、調用美型、貼紙、特效、哈哈鏡沒有效果(Call beauty stickers special effects funhouse mirror have no effect)
- 3.MHBeautyManager的特別聲明(Special statement from MHBeautyManager)
- 4.使用MHUI的注意事項(Considerations for using MHUI)
- 5.卡頓問題(Caton problem)
- 6.閃退問題(flash back problem)
- 7.貼紙無法下載(Stickers cannot be downloaded)
- 8.AndroidX騰訊云環境集成問題(AndroidX Tencent cloud environment integration problems)
- 9.導入新的sdk出現亂碼(Garbled characters appear when importing a new SDK)
- 10.彈出的UI有陰影效果(The UI that pops up has a shadow effect)
- 11.Android10出現網絡資源失敗請檢查網絡(Android10 network resource failure please check the network)
- 12.美狐可以記錄設置的各種參數嗎(Can us fox record various parameters set)
- 13.七牛云替換sdk畫面上下顛倒(Seven niuyun replacement SDK screen upside down)
- 14.貼紙可以自定義嗎(Can stickers be customized)
- 15.您這邊可以錄制視頻嗎(Can you record a video)
- 16.MHSDK必須本地依賴嗎(Does MHSDK have to be locally dependent)
- 17.找不到某個方法(I can't find a way)
- 18.環信不顯示自己的頭像框(Ring letter does not show your avatar box)
- 19.如何取消特效(How to Cancel special effects)
- 20.水印沒有找到(Watermark not found)
- 21.聲網視頻通話大小屏切換問題(The size screen switchover of sonnet video calls is abnormal)
- 22.如何切換sdk的語言