如何使用相芯科技美妆SDK实现美妆(Android)
生活随笔
收集整理的這篇文章主要介紹了
如何使用相芯科技美妆SDK实现美妆(Android)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.美妝功能介紹
相芯SDK提供23種內置美妝妝容,如減齡,鄰家女孩,歐美等多樣妝容風格。支持口紅、腮紅、 眉毛、眼影、 眼線、睫毛、美瞳、粉底、眼影、高光等15大維度,多種搭配,輕松實現變妝。
2.常見使用場景
短視頻平臺,社交娛樂,手機相機,直播平臺,包括美妝品牌可以聯合相芯打造在線試妝,提高商業轉化率。
3.示例源碼下
請參考 下載示例源碼 獲取源碼。
4.使用前必查
5使用步驟
5.1Faceunity接入
5.1.1 build.gradle配置
allprojects配置
allprojects {repositories {...maven { url 'https://maven.faceunity.com/repository/maven-public/' }?...} }dependencies導入依賴
dependencies { ... implementation 'com.faceunity:core:8.6.0'? implementation 'com.faceunity:model:8.6.0'? ... }5.2美妝調用示例
相芯SDK內置23種組合妝容,供您一鍵切換妝容,當然您也可以自己設置口紅,眉毛,粉底等美妝參數,實現自定義美妝組合功能。
5.2.1.加載美妝組合妝容
mFURenderKit.setFaceBeauty(FaceBeautySource.clone(FaceBeautyDataFactory.faceBeauty));//加載美顏特效 mFURenderKit.getFaceBeauty().setFilterName(currentFilterName);//加載濾鏡mFURenderKit.getFaceBeauty().setFilterIntensity(currentFilterIntensity);//設置濾鏡強度if(!currentMakeup.getControlBundle().getPath().equals(DemoConfig.BUNDLE_FACE_MAKEUP))currentMakeup.setFilterIntensity(currentFilterIntensity);//加載美妝bundle,美妝組合組合妝容,設置美妝強度 mFURenderKit.setMakeup(currentMakeup);//加載美妝特效5.2.2自定義美妝眉毛示例
currentMakeup.setEnableBrowWarp(false);//關閉眉毛變形 currentMakeup.setEyeBrowBundle(new FUBundleData(itemDir + "mu_style_eyebrow_0" + index + ".bundle"));//加載眉毛道具 currentMakeup.setEyeBrowIntensity((intensity));設置眉毛強度6.美妝接口
6.1.SimpleMakeup(face makeup.bundle)
設置組合妝容接口說明
fun?setCombinedConfig(controlBundle:?FUBundleData?)參數說明
controlBundle:組合妝容對應的FUBundleData對象
6.2.美妝makeup構造
加載美妝模型接口說明
class?SimpleMakeup?(controlBundle:?FUBundleData)參數說明
controlBundle:通過美妝ControlBundle文件構造的文件數據模型
總結
以上是生活随笔為你收集整理的如何使用相芯科技美妆SDK实现美妆(Android)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NVMe ssd加速卡和NVMe ssd
- 下一篇: R语言的点图dot plot