-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1. 完善文档 * 1. 去掉安卓的相关说明 * 1. 更新快速集成说明 * 1. 修改错别字 * 1. 修改图片链接地址
- Loading branch information
Showing
18 changed files
with
88 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,140 +1,55 @@ | ||
<a href="http://www.bbtexiao.com/"><img src="doc/summarize1.jpg" border="0" alt="宝宝特效" /></a> | ||
<a href="http://www.bbtexiao.com/"><img src="doc/summarize2.jpg" border="0" alt="宝宝特效" /></a> | ||
|
||
 | ||
 | ||
 | ||
# 宝宝特效 AiyaEffectsSDK iOS 使用手册 | ||
|
||
AiyaCameraSDK 说明文档 | ||
## 1. 概述 | ||
宝宝特效 AiyaEffectsSDK 涵盖Android、iOS两个平台,基于自主研发的人脸识别模块,作为一款动态贴纸和动画特效高效渲染的解决方案 | ||
|
||
[Android版AiyaEffectSDK](https://github.com/aiyaapp/AiyaEffectsAndroid) | ||
### 1.1 版本信息 | ||
最新版本 : v3.0.0 [更多版本信息](doc/versionHistory.md) | ||
|
||
[IOS版AiyaEffectsSDK](https://github.com/aiyaapp/AiyaEffectsIOS) | ||
### 1.2 集成示例 | ||
* [集成到金山云的示例](https://github.com/aiyaapp/AiyaEffectsWithKSVCIOS) | ||
* [集成到ZegoLive的示例](https://github.com/aiyaapp/AiyaEffectsWithZegoIOS) | ||
|
||
[Android版集成到金山云的示例](https://github.com/aiyaapp/AiyaEffectsWithKSVCAndroid) | ||
### 1.3 关于热更新 | ||
宝宝特效 AiyaEffectsSDK 保证,提供的[AiyaEffectsSDK iOS](https://github.com/aiyaapp/AiyaEffectsIOS)未使用热更新技术,请放心使用。 | ||
|
||
[Android版集成到ZegoLive的示例](https://github.com/aiyaapp/AiyaEffectsWithZegoAndroid) | ||
## 2. AiyaEffecSDK 功能说明 | ||
|
||
[IOS版集成到金山云的示例](https://github.com/aiyaapp/AiyaEffectsWithKSVCIOS) | ||
### 功能列表 | ||
- [x] 支持动态贴纸 | ||
- [x] 支持动画特效 | ||
- [x] 支持自定义动态贴纸 | ||
- [x] 支持自定义动画特效 | ||
- [x] 支持美颜 | ||
|
||
[IOS版集成到ZegoLive的示例](https://github.com/aiyaapp/AiyaEffectsWithZegoIOS) | ||
## 3. 运行环境 | ||
AiyaEffectsSDK iOS 可运行于 iPhone/iPod Touch, 支持iOS 8.0及以上版本, 支持armv7/armv7s/arm64运行. | ||
|
||
# 1、版本信息 | ||
最新版本 V3.0.0 | ||
## 4. 下载工程 | ||
本SDK提供如下两种获取方式: | ||
|
||
AiyaCamera SDK V3.0.0 | ||
> | ||
**功能更新** | ||
- 修复了部分bug | ||
- 资源文件打包 | ||
- 人脸识别算法优化 | ||
- 加入了更多特效 | ||
* 从[github下载](https://github.com/aiyaapp/AiyaEffectsIOS) | ||
* 从[oschina下载](http://git.oschina.net/wangyng/AiyaEffectsIOS),国内访问更快 | ||
|
||
[历史版本信息](doc/versionHistory.md) | ||
## 5. 快速集成 | ||
[快速集成](doc/howToUse.md)中提供了集成 AiyaEffectsSDK iOS 的方法 | ||
|
||
# 2、运行环境说明 | ||
AiyaCameraSDK 最低运行版本为iOS8.0 | ||
## 6. 自定义动态贴纸和动画特效 | ||
制作动态贴纸和动画特效的教程还未正式开放,请直接[联系客服](http://www.bbtexiao.com/site/about)获取制作教程和大量炫酷特效 | ||
|
||
# 3、SDK 功能说明 | ||
AiyaEffectsSDK可用于相机、图片处理、直播等多种情景,主要功能如下: | ||
## 7. 注意事项 | ||
* 本framework不支持模拟器运行 | ||
|
||
- 2D序列帧特效 | ||
- 3D静态特效和动画特效 | ||
- 多种美颜算法 | ||
## 8. License说明 | ||
* 宝宝特效 AiyaEffectsSDK 可以用于商业应用 | ||
* 申请appKey请访问[宝宝特效 免费使用](http://bbtexiao.aiyaapp.com/site/free) | ||
|
||
# 4、SDK API说明 | ||
###### AiyaCamera: 相机组件. | ||
通过设置启动相机时的参数以及设置美颜和滤镜参数,打开相机,对相机输出的数据进行美颜和滤镜处理.使用前要验证License. | ||
## 9. 反馈与建议 | ||
- 主页: [宝宝特效](http://www.bbtexiao.com) | ||
- 邮箱: <[email protected]> | ||
- QQ讨论群: 建设中 | ||
|
||
###### AiyaEffectProcess: 图像数据处理组件(特效,美颜). | ||
设置美颜和滤镜参数,对图像数据进行美颜和滤镜处理.使用前要验证License. | ||
|
||
###### AiyaGPUImagexxxFilter: 滤镜. | ||
特效滤镜,美颜滤镜. | ||
|
||
###### AYxxx: GPUImageSDK中的核心类. | ||
都以AY为前缀.逻辑无修改. | ||
|
||
###### AiyaLicenseManager: 验证License. | ||
在启动时调用. | ||
|
||
###### AiyaCameraEffect: | ||
对视频图像数据进行美颜和特效处理. | ||
|
||
# 5、集成说明 | ||
## 1. 导入SDK静态库文件AiyaCameraSDK.framework和资源文件 AYEffectTrackerData目录下所有文件和thirdLib目录下的第三方库 | ||
|
||
## 2. 导入依赖的系统库动态库 libz.tbd, libc++.tbd, libiconv.tbd | ||
|
||
## 3. 初始化Lisence.在使用AiyaCameraSDK之前,必须先初始化license,否则会出现无法使用的情况.License申请请访问:http://bbtexiao.aiyaapp.com/site/free 我们在收到您的申请后会及时审批,并把审批结果发送到您的邮箱,请注意查收. | ||
```objective-c | ||
[AiyaLicenseManager initLicense:@"对应的licenseKey"]; | ||
|
||
``` | ||
## 4. 具体使用方式如下 | ||
* 使用方式一: 用AiyaCamera对相机数据进行特效加美颜处理 | ||
```objective-c | ||
_camera = [[AiyaCamera alloc]initWithPreview:self.view cameraPosition:AVCaptureDevicePositionFront];//设置为前置相机 | ||
[self.camera setSessionPreset:AVCaptureSessionPreset1280x720]; | ||
[self.camera setEffectPath:path];//设置特效路径 | ||
[self.camera setEffectPlayCount:0];//设置特效播放次数.0表示一直重复 | ||
[self.camera setBeautyLevel:AIYA_BEAUTY_LEVEL_5];//设置美颜等级 | ||
[self.camera setBeautyType:AIYA_BEAUTY_TYPE_0];//设置美颜类型 | ||
[self.camera setHasAudioTrack:YES];//打开音频数据采集 | ||
self.camera.delegate = self; | ||
[self.camera startCapture];//打开相机 | ||
#pragma mark AiyaCameraDelegate | ||
/** | ||
特效渲染完成后的数据回调 | ||
*/ | ||
- (void)videoCaptureOutput:(AiyaCamera *)capture pixelBuffer:(CVPixelBufferRef)pixelBuffer frameTime:(CMTime)frameTime effectStatus:(AIYA_CAMERA_EFFECT_STATUS)effectStatus{ | ||
} | ||
/** | ||
音频数据的回调 | ||
*/ | ||
- (void)audioCaptureOutput:(AiyaCamera *)capture audioBuffer:(CMSampleBufferRef)audioBuffer{ | ||
} | ||
``` | ||
* 使用方式二: 用AiyaEffectProcess对像素缓冲区数据进行处理 | ||
```objective-c | ||
_aiyaEffectProcess = [[AiyaEffectProcess alloc]init];//只初始化一次 | ||
_aiyaEffectProcess.beautyLevel = AIYA_BEAUTY_LEVEL_5; | ||
_aiyaEffectProcess.beautyType = AIYA_BEAUTY_TYPE_0; | ||
_aiyaEffectProcess.effectPath = path;//设置特效路径 | ||
_aiyaEffectProcess.effectPlayCount = 1;//特效只播放一次 | ||
|
||
//---对像素缓冲区数据进行特效和美颜处理--- | ||
[_aiyaEffectProcess processWithPixelBuffer:pixelBuffer]; | ||
//---特效和美颜处理结束--- | ||
``` | ||
# 6、资源说明 | ||
贴纸资源制作规范请参照其他相关文档。 | ||
# 7、常见问题 | ||
问题一: 如果项目中已经集成了GPUImageSDK怎么办?会不会产生冲突 | ||
答: AiyaCameraSDK中封装的GPUImageSDK,全部类,c函数,宏都做了加前缀的处理.集成到项目中时不会和原有的GPUImageSDK产生冲突. | ||
问题二: SDKDemo中有Podfile文件,但是我的电脑没有装pod怎么办? | ||
答: SDKDemo已经把第三方库打包进去了.不需要下载更新第三方库.双击AiyaCameraSDKDemo.xcworkspace文件,打开后即可运行SDKDemo. | ||
问题三: 模拟器上无法运行.一直报错找不到文件怎么办? | ||
答: 目前SDK没有打包x86版本,无法在模拟器上运行.只能在真机上运行. | ||
问题四: 没有网络时License会失效吗? | ||
答: 没有网络也可以正常使用. | ||
# 8、License说明 | ||
1. 每次启动时都要进行验证. | ||
2. 首次验证会进行联网. | ||
3. License 验证是异步请求,不影响主线程 | ||
4. AiyaLicenseManager的initLicense函数返回码说明: | ||
YES 认证成功, SDK可以正常使用 | ||
NO 认证失败, SDK不可以使用,请通过下面的联系方式联系我们 | ||
5. license申请请访问:http://bbtexiao.aiyaapp.com/site/free 我们在收到您的申请后会及时审批,并把审批结果发送到您的邮箱,请注意查收. | ||
# 9、联系方式 | ||
邮箱: [email protected] | ||
<a href="http://www.bbtexiao.com/"><img src="doc/logo.png" border="0" alt="宝宝特效" /></a> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 宝宝特效 AiyaEffecSDK iOS 快速集成 | ||
|
||
## Step1 集成framework | ||
将 宝宝特效 AiyaEffectSDK iOS 解压后, 将 AiyaEfffectsDemo/AiyaEffectSDK 目录拖到项目中.然后添加另外两个系统库: | ||
* libiconv.tdb | ||
* libc++.tdb | ||
|
||
 | ||
|
||
## Step2 初始化License | ||
在使用AiyaCameraSDK之前,必须先初始化license,否则会出现无法使用的情况,申请appKey请访问[宝宝特效 免费使用](http://bbtexiao.aiyaapp.com/site/free) | ||
|
||
 | ||
|
||
## Step3 调用 | ||
|
||
### 调用方式一: | ||
使用AiyaCamera预览和处理数据, 这种方式可直接参考[AiyaEffectsDemo](https://github.com/aiyaapp/AiyaEffectsIOS) | ||
|
||
 | ||
 | ||
 | ||
|
||
|
||
### 调用方式二: | ||
把AiyaEffectSDK 封装成GPUImageFilter使用, 这种方式可参考[KSYAiyaDemo](https://github.com/aiyaapp/AiyaEffectsWithKSVCIOS) | ||
|
||
 | ||
|
||
### 调用方式三: | ||
使用AiyaEffectProcess 处理 CVPixelBufferRef, 这种方式可参考[zegoAiyaDemo](https://github.com/aiyaapp/AiyaEffectsWithZegoIOS) | ||
|
||
 | ||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.