直播美颜sdk常见的两个疑难问题解答、代码分析
直播美颜sdk是目前比较热门的工具,其强大的美颜功能和趣味拍摄功能让用户们“爱不释手”。时至今日,美颜sdk甚至成了各大视频、直播、社交、拍摄平台的刚需,随着用户量的增多,一些问题也逐渐显现了出来,今天小编就为大家讲解两个直播美颜sdk的常见问题。一般都没有把人脸单独提取出来做美颜,美颜sdk是通过肤色检测来确定美颜范围的。如果追踪的比较紧,需要每帧都做检测,性能要求可定是非常高,以毫秒计。以安卓
直播美颜sdk是目前比较热门的工具,其强大的美颜功能和趣味拍摄功能让用户们“爱不释手”。时至今日,美颜sdk甚至成了各大视频、直播、社交、拍摄平台的刚需,随着用户量的增多,一些问题也逐渐显现了出来,今天小编就为大家讲解两个直播美颜sdk的常见问题。
一、直播美颜sdk时下有哪些技术难题?
适配一直是美颜sdk中最难处理的问题。以安卓为例,有上千种不同型号的手机和版本,导致在安卓平台上,美颜sdk很难做到兼容所有设备。
二、运动物体检测
一般都没有把人脸单独提取出来做美颜,美颜sdk是通过肤色检测来确定美颜范围的。如果是在运动中做检测和跟踪,对性能的要求肯定高。如果追踪的比较紧,需要每帧都做检测,性能要求可定是非常高,以毫秒计。
三、影响直播美颜sdk速度的原因
1、网络环境
2、硬件环境
四、直播美颜sdk代码分析
//
// AppDelegate.m
// MHOpenDemo
//
// Created by Apple on 2021/5/31.
//
#import “AppDelegate.h”
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}
#pragma mark - UISceneSession lifecycle
-
(UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return [[UISceneConfiguration alloc] initWithName:@“Default Configuration” sessionRole:connectingSceneSession.role];
} -
(void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
@end
更多推荐
所有评论(0)