Git Product home page Git Product logo

androidtopfacesdksample's Introduction

#AndroidTopFaceSDKSample使用说明
官网地址
##接入流程 ###依赖库导入
眼镜试戴模块,所依赖的库文件为: topface-release.aar,需添加到Android项目中。
###授权认证
调用com.topplusvision.topface.TopFace的init(getApplicationContext(), " client_id", " client_secret"); 说明:申请 client_id 和 client_secret 后调用此函数获得授权。不调用认证函数无法使用人脸检测功能,正确调用认证函数即可正常使用。
获取License
###SDK初始化
在检测之前调用com.topplusvision.topface.TopFace的initWithFocus(Context context, float focus)初始化检测上下文
##接口定义和使用说明

/**
* 初始化TopFace
* @param context 上下文
* @param focus 焦距
* @return 返回码,-1表示初始化失败,0表示初始化成功
*/
public static int initWithFocus(Context context,float focus) ;


/**
 * 检测人脸
 * @param nv21 摄像头数据 yuv格式
 * @param width  摄像头数据宽度
 * @param height 摄像头数据高度
 * @param bytePerPix 每个像素点的 byte
 * @param rotation 摄像头数据旋转角度
 * @return长度为151的数组,第0~135位表示68个人脸特征点二维像素坐标,原点是传入图像的左上角,特征点代表意义参考示意图;第136~138位表示人脸鼻尖处在相机坐标系下的位置数据,坐标系定义:x轴向右,y轴向下,z轴向前;第139~141位表示人脸相对相机的姿态数据,单位是弧度,依次定义为:pitc俯仰角、roll翻滚角、yaw偏航角;第142位表示置信度.
 */

public static float[] dynamicDetect(byte[] nv21, int width, int height, float bytePerPix, int rotation);

##68个人脸特征点二维像素坐标图 ![](https://github.com/topplus/AndroidTopFaceSDKSample/raw/master/images/feature.jpg)

androidtopfacesdksample's People

Contributors

topplusandy avatar topplus avatar

Watchers

flyfirelai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.