Skip to content

Commit

Permalink
Modify doc (#9)
Browse files Browse the repository at this point in the history
* 1. 完善文档

* 1. 去掉安卓的相关说明

* 1. 更新快速集成说明

* 1. 修改错别字

* 1. 修改图片链接地址
  • Loading branch information
WangYng authored and aiyaapp committed Jun 10, 2017
1 parent e525319 commit ae4d163
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 130 deletions.
2 changes: 1 addition & 1 deletion AiyaEffectsDemo/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ - (void)onChangeCameraPosition:(AVCaptureDevicePosition)captureDevicePosition{
}

-(void)onEffectClick:(NSString *)path{

//请直接[联系客服]http://www.bbtexiao.com/site/about获取特效制作教程和大量炫酷特效
[self.camera setEffectPath:path];
self.camera.effectPlayCount = 0;
}
Expand Down
163 changes: 39 additions & 124 deletions README.md
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>

![](doc/21.gif)
![](doc/17.gif)
![](doc/16.gif)
# 宝宝特效 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 removed doc/16.gif
Binary file not shown.
Binary file removed doc/17.gif
Binary file not shown.
Binary file removed doc/21.gif
Binary file not shown.
34 changes: 34 additions & 0 deletions doc/howToUse.md
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

![](inputSDK.png)

## Step2 初始化License
在使用AiyaCameraSDK之前,必须先初始化license,否则会出现无法使用的情况,申请appKey请访问[宝宝特效 免费使用](http://bbtexiao.aiyaapp.com/site/free)

![](initLicense.png)

## Step3 调用

### 调用方式一:
使用AiyaCamera预览和处理数据, 这种方式可直接参考[AiyaEffectsDemo](https://github.com/aiyaapp/AiyaEffectsIOS)

![](initCamera.png)
![](startCamera.png)
![](setupEffect.png)


### 调用方式二:
把AiyaEffectSDK 封装成GPUImageFilter使用, 这种方式可参考[KSYAiyaDemo](https://github.com/aiyaapp/AiyaEffectsWithKSVCIOS)

![](ksy.png)

### 调用方式三:
使用AiyaEffectProcess 处理 CVPixelBufferRef, 这种方式可参考[zegoAiyaDemo](https://github.com/aiyaapp/AiyaEffectsWithZegoIOS)

![](zego.png)
![](zego1.png)
Binary file added doc/initCamera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/initLicense.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/inputSDK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/ksy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/setupEffect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/startCamera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/summarize1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/summarize2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 14 additions & 5 deletions doc/versionHistory.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
AiyaCamera SDK V2.1.0

AiyaEffectsSDK iOS V3.0.0
>
**功能更新**
- 修复了部分bug
- 资源文件打包
- 人脸识别算法优化
- 加入了更多特效

AiyaEffectsSDK iOS V2.1.0
>
**功能更新**
- 修复了部分bug
Expand All @@ -7,25 +16,25 @@ AiyaCamera SDK V2.1.0
- 从SDK分离出第三方库
- 资源体积进一步缩小

AiyaCamera SDK V2.0.0
AiyaEffectsSDK iOS V2.0.0
>
**功能更新**
- 优化代码结构,加入Camera类.方便快速集成

AiyaCamera SDK V1.3.0
AiyaEffectsSDK iOS V1.3.0
>
**功能更新**
- 使用GPUImage作为框架.把美颜和特效处理封闭成Filter
- 优化美颜效果

AiyaCamera SDK V1.2.0
AiyaEffectsSDK iOS V1.2.0
>
**功能更新**
- 优化贴纸流程
- 增加美颜功能
- 增加快速集成相机功能

AiyaCamera SDK V1.0.0
AiyaEffectsSDK iOS V1.0.0
>
**功能更新:**
- 完成贴纸效果
Binary file added doc/zego.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/zego1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ae4d163

Please sign in to comment.