人脸识别全志T509工业级Android芯片商汤算法sdk说明
作者:互联网
双目活体接口调用流程
1. 初始化
首先,需要提前将model文件和license文件拷贝到设备上。
可以参考sample,调用FileUtil.copyAssetsToFile或者采用其他方式实现。
调用**BinocularEngine.getInstance().init**接口进行初始化
注意:由于模型大小和设备性能,建议异步初始化
2. 配置
在初始化时进行传入可以进行双目活体相关的参数配置
实例化**IdentifyConfig**并配置对应Config
1.设置初始化配置**setInitConfig(InitConfig initConfig)**
2.设置识别图像配置**setImageConfig(ImageConfig var1)**
3.设置识别阀值配置**setThresholdConfig(ThresholdConfig var1)**
3. 输入数据
'调取双目帧数据输入'调用**BinocularEngine.getInstance().input**接口
4.识别控制
'开始识别'调用**BinocularEngine.getInstance().start**接口
'停止识别'调用**BinocularEngine.getInstance().stop**接口
5.结果回调
'添加回调'调用**BinocularEngine.getInstance().addIdentifyCallback**接口
'移出回调'调用**BinocularEngine.getInstance().removeIdentifyCallback**接口
6.进行提取特征和人脸比对
`提取特征`调用**BinocularEngine.getInstance().extractFeature**接口
`人脸比对`调用**BinocularEngine.getInstance().compareFeature**接口
`人脸质量`调用**BinocularEngine.getInstance().quality**接口
7.释放资源
调用**BinocularEngine.getInstance().release**接口
标签:初始化,人脸识别,getInstance,全志,接口,BinocularEngine,调用,Android,识别 来源: https://blog.csdn.net/napoleaon88/article/details/112134034