cordova-plugin-lnsoft-facerecognition
Apache Cordova 人脸识别插件。
说明
启动扫描控件的方法:
navigatorlnsoft;
其中:
- callback 为成功回调方法,接收
ArrayBuffer
作为回调参数。 - options 为参数选项,目前仅支持传入一个小数,表示扫脸方框的占比。
完成扫描识别后,要及时销毁控件:
navigatorlnsoft
页面效果使用 web 技术开发实现,将 webview 中页面的 html
、body
等的 background-color
设置为 transparent
,即可将相机控件的 View 组件显示出来,在其上层开发页面即可。
示例
if !navigatorlnsoft || !navigatorlnsoftstartPreview this; return;navigatorlnsoft; { let file = imageBuffer 'face.jpg' type: 'image/jpeg' lastModified: Date; let formData = ; formData; this ; navigatorlnsoft;}