Blame view

HHVDoctorSDK/TXLiteAVSDK_TRTC.framework/Headers/TXBeautyManager.h 12.1 KB
1
/**
liumingming authored
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 * Module:   美颜与图像处理参数设置类
 * Function: 修改美颜、滤镜、绿幕等参数
 */
#import <Foundation/Foundation.h>
#import <TargetConditionals.h>
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
typedef UIImage TXImage;
#else
#import <AppKit/AppKit.h>
typedef NSImage TXImage;
#endif

NS_ASSUME_NONNULL_BEGIN

/// @defgroup TXBeautyManager_ios TXBeautyManager
18
/// 美颜与图像处理参数设置类
liumingming authored
19 20 21 22
/// @{

/**
 * 美颜(磨皮)算法
23
 * TRTC 内置多种不同的磨皮算法,您可以选择最适合您产品定位的方案。
liumingming authored
24 25
 */
typedef NS_ENUM(NSInteger, TXBeautyStyle) {
26 27 28 29 30 31 32 33 34

    ///光滑,算法比较激进,磨皮效果比较明显,适用于秀场直播。
    TXBeautyStyleSmooth = 0,

    ///自然,算法更多地保留了面部细节,磨皮效果更加自然,适用于绝大多数直播场景。
    TXBeautyStyleNature = 1,

    ///优图,由优图实验室提供,磨皮效果介于光滑和自然之间,比光滑保留更多皮肤细节,比自然磨皮程度更高。
    TXBeautyStylePitu = 2
liumingming authored
35 36 37 38 39 40 41
};

@interface TXBeautyManager : NSObject

/**
 * 设置美颜(磨皮)算法
 *
42
 * TRTC 内置多种不同的磨皮算法,您可以选择最适合您产品定位的方案:
liumingming authored
43
 *
44
 * @param beautyStyle 美颜风格,TXBeautyStyleSmooth:光滑;TXBeautyStyleNature:自然;TXBeautyStylePitu:优图。
liumingming authored
45 46 47 48 49
 */
- (void)setBeautyStyle:(TXBeautyStyle)beautyStyle;

/**
 * 设置美颜级别
50 51
 *
 * @param beautyLevel 美颜级别,取值范围0 - 9; 0表示关闭,9表示效果最明显。
liumingming authored
52
 */
53
- (void)setBeautyLevel:(float)beautyLevel;
liumingming authored
54 55 56 57

/**
 * 设置美白级别
 *
58
 * @param whitenessLevel 美白级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
liumingming authored
59
 */
60
- (void)setWhitenessLevel:(float)whitenessLevel;
liumingming authored
61 62 63 64 65 66 67 68 69

/**
 * 开启清晰度增强
 */
- (void)enableSharpnessEnhancement:(BOOL)enable;

/**
 * 设置红润级别
 *
70
 * @param ruddyLevel 红润级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
liumingming authored
71
 */
72
- (void)setRuddyLevel:(float)ruddyLevel;
liumingming authored
73 74

/**
75
 * 设置色彩滤镜效果
liumingming authored
76
 *
77 78 79
 * 色彩滤镜,是一副包含色彩映射关系的颜色查找表图片,您可以在我们提供的官方 Demo 中找到预先准备好的几张滤镜图片。
 * SDK 会根据该查找表中的映射关系,对摄像头采集出的原始视频画面进行二次处理,以达到预期的滤镜效果。
 * @param image 包含色彩映射关系的颜色查找表图片,必须是 png 格式。
liumingming authored
80 81
 */
- (void)setFilter:(nullable TXImage *)image;
82
liumingming authored
83
/**
84
 * 设置色彩滤镜的强度
liumingming authored
85
 *
86 87
 * 该数值越高,色彩滤镜的作用强度越明显,经过滤镜处理后的视频画面跟原画面的颜色差异越大。
 * 我默认的滤镜浓度是0.5,如果您觉得默认的滤镜效果不明显,可以设置为 0.5 以上的数字,最大值为1。
liumingming authored
88
 *
89
 * @param strength 从0到1,数值越大滤镜效果越明显,默认值为0.5。
liumingming authored
90 91 92 93 94 95
 */
- (void)setFilterStrength:(float)strength;

/**
 * 设置绿幕背景视频,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
96
 * 此接口所开启的绿幕功能不具备智能去除背景的能力,需要被拍摄者的背后有一块绿色的幕布来辅助产生特效。
liumingming authored
97
 *
98
 * @param path MP4格式的视频文件路径; 设置空值表示关闭特效。
wangguolei authored
99
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
100
 */
wangguolei authored
101
- (int)setGreenScreenFile:(nullable NSString *)path;
liumingming authored
102 103 104 105

/**
 * 设置大眼级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
106
 * @param eyeScaleLevel 大眼级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
107
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
108
 */
109
#if TARGET_OS_IPHONE
wangguolei authored
110
- (int)setEyeScaleLevel:(float)eyeScaleLevel;
111
#endif
liumingming authored
112 113 114 115

/**
 * 设置瘦脸级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
116
 * @param faceSlimLevel 瘦脸级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
117
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
118
 */
119
#if TARGET_OS_IPHONE
wangguolei authored
120
- (int)setFaceSlimLevel:(float)faceSlimLevel;
121
#endif
liumingming authored
122 123

/**
124
 * 设置 V 脸级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
125
 *
126
 * @param faceVLevel V脸级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
127
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
128
 */
129
#if TARGET_OS_IPHONE
wangguolei authored
130
- (int)setFaceVLevel:(float)faceVLevel;
131
#endif
liumingming authored
132 133 134 135

/**
 * 设置下巴拉伸或收缩,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
136
 * @param chinLevel 下巴拉伸或收缩级别,取值范围-9 - 9;0 表示关闭,小于0表示收缩,大于0表示拉伸。
wangguolei authored
137
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
138
 */
139
#if TARGET_OS_IPHONE
wangguolei authored
140
- (int)setChinLevel:(float)chinLevel;
141 142
#endif
liumingming authored
143 144 145
/**
 * 设置短脸级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
146
 * @param faceShortLevel 短脸级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
147
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
148
 */
149
#if TARGET_OS_IPHONE
wangguolei authored
150
- (int)setFaceShortLevel:(float)faceShortLevel;
151
#endif
liumingming authored
152 153 154 155

/**
 * 设置窄脸级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
156
 * @param level 窄脸级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
157
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
158
 */
159
#if TARGET_OS_IPHONE
wangguolei authored
160
- (int)setFaceNarrowLevel:(float)faceNarrowLevel;
161
#endif
liumingming authored
162 163 164 165

/**
 * 设置瘦鼻级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
166
 * @param noseSlimLevel 瘦鼻级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
167
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
168
 */
169
#if TARGET_OS_IPHONE
wangguolei authored
170
- (int)setNoseSlimLevel:(float)noseSlimLevel;
171
#endif
liumingming authored
172 173

/**
174
 * 设置亮眼级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
175
 *
176
 * @param eyeLightenLevel 亮眼级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
177
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
178
 */
179
#if TARGET_OS_IPHONE
wangguolei authored
180
- (int)setEyeLightenLevel:(float)eyeLightenLevel;
181
#endif
liumingming authored
182 183

/**
184
 * 设置牙齿美白级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
185
 *
186
 * @param toothWhitenLevel 白牙级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
187
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
188
 */
189
#if TARGET_OS_IPHONE
wangguolei authored
190
- (int)setToothWhitenLevel:(float)toothWhitenLevel;
191
#endif
liumingming authored
192 193

/**
194
 * 设置祛皱级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
195
 *
196
 * @param wrinkleRemoveLevel 祛皱级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
197
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
198
 */
199
#if TARGET_OS_IPHONE
wangguolei authored
200
- (int)setWrinkleRemoveLevel:(float)wrinkleRemoveLevel;
201
#endif
liumingming authored
202 203

/**
204
 * 设置祛眼袋级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
205
 *
206
 * @param pounchRemoveLevel 祛眼袋级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
207
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
208
 */
209
#if TARGET_OS_IPHONE
wangguolei authored
210
- (int)setPounchRemoveLevel:(float)pounchRemoveLevel;
211
#endif
liumingming authored
212 213

/**
214
 * 设置法令纹去除级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
215
 *
216
 * @param smileLinesRemoveLevel 法令纹级别,取值范围0 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
217
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
218
 */
219
#if TARGET_OS_IPHONE
wangguolei authored
220
- (int)setSmileLinesRemoveLevel:(float)smileLinesRemoveLevel;
221
#endif
liumingming authored
222 223

/**
224
 * 设置发际线调整级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
225
 *
226
 * @param foreheadLevel 发际线级别,取值范围-9 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
227
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
228
 */
229
#if TARGET_OS_IPHONE
wangguolei authored
230
- (int)setForeheadLevel:(float)foreheadLevel;
231
#endif
liumingming authored
232 233

/**
234
 * 设置眼距,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
235
 *
236
 * @param eyeDistanceLevel 眼距级别,取值范围-9 - 9;0表示关闭,小于0表示拉伸,大于0表示收缩。
wangguolei authored
237
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
238
 */
239
#if TARGET_OS_IPHONE
wangguolei authored
240
- (int)setEyeDistanceLevel:(float)eyeDistanceLevel;
241
#endif
liumingming authored
242 243

/**
244
 * 设置眼角调整级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
245
 *
246
 * @param eyeAngleLevel 眼角调整级别,取值范围-9 - 9;0表示关闭,9表示效果最明显。
wangguolei authored
247
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
248
 */
249
#if TARGET_OS_IPHONE
wangguolei authored
250
- (int)setEyeAngleLevel:(float)eyeAngleLevel;
251
#endif
liumingming authored
252 253

/**
254
 * 设置嘴型调整级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
255
 *
256
 * @param mouthShapeLevel 嘴型级别,取值范围-9 - 9;0表示关闭,小于0表示拉伸,大于0表示收缩。
wangguolei authored
257
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
258
 */
259
#if TARGET_OS_IPHONE
wangguolei authored
260
- (int)setMouthShapeLevel:(float)mouthShapeLevel;
261
#endif
liumingming authored
262 263

/**
264
 * 设置鼻翼调整级别,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
265
 *
266
 * @param noseWingLevel 鼻翼调整级别,取值范围-9 - 9;0表示关闭,小于0表示拉伸,大于0表示收缩。
wangguolei authored
267
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
268
 */
269
#if TARGET_OS_IPHONE
wangguolei authored
270
- (int)setNoseWingLevel:(float)noseWingLevel;
271
#endif
liumingming authored
272 273

/**
274 275 276
 * 设置鼻子位置,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
 * @param nosePositionLevel 鼻子位置级别,取值范围-9 - 9;0表示关闭,小于0表示抬高,大于0表示降低。
wangguolei authored
277
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
278
 */
279
#if TARGET_OS_IPHONE
wangguolei authored
280
- (int)setNosePositionLevel:(float)nosePositionLevel;
281
#endif
liumingming authored
282 283

/**
284 285 286
 * 设置嘴唇厚度,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
 * @param lipsThicknessLevel 嘴唇厚度级别,取值范围-9 - 9;0表示关闭,小于0表示拉伸,大于0表示收缩。
wangguolei authored
287
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
288
 */
289
#if TARGET_OS_IPHONE
wangguolei authored
290
- (int)setLipsThicknessLevel:(float)lipsThicknessLevel;
291
#endif
liumingming authored
292 293 294

/**
 * 设置脸型,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
295 296
 *
 * @param   faceBeautyLevel 美型级别,取值范围0 - 9;0表示关闭,1 - 9值越大,效果越明显。
wangguolei authored
297
 * @return 0:成功;-5:当前 License 对应 feature 不支持。
liumingming authored
298
 */
299
#if TARGET_OS_IPHONE
wangguolei authored
300
- (int)setFaceBeautyLevel:(float)faceBeautyLevel;
301
#endif
liumingming authored
302 303 304 305

/**
 * 选择 AI 动效挂件,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
 *
306 307
 * @param tmplName 动效挂件名称
 * @param tmplDir 动效素材文件所在目录
liumingming authored
308
 */
309
#if TARGET_OS_IPHONE
liumingming authored
310
- (void)setMotionTmpl:(nullable NSString *)tmplName inDir:(nullable NSString *)tmplDir;
311
#endif
liumingming authored
312 313

/**
314
 * 是否在动效素材播放时静音,该接口仅在 [企业版 SDK](https://cloud.tencent.com/document/product/647/32689#Enterprise) 中生效
liumingming authored
315 316 317 318
 * 有些挂件本身会有声音特效,通过此 API 可以关闭这些特效播放时所带的声音效果。
 *
 * @param motionMute YES:静音;NO:不静音。
 */
319
#if TARGET_OS_IPHONE
liumingming authored
320 321 322 323 324 325 326
- (void)setMotionMute:(BOOL)motionMute;
#endif

@end
/// @}

NS_ASSUME_NONNULL_END