using System.Collections.Generic;
using UnityEngine;
using Baidu.Aip.Face;
using Newtonsoft.Json.Linq;
using UnityEngine.UI;
using System.IO;
//识别,(用于签到考勤)
public class FaceIdentify : MonoBehaviour {
private Face client;//百度API接口
private JObject result;//识别数据的返回结果
private byte[] image;//图片字节数
private Dictionary<string, object> options = new Dictionary<string, object>();//多参数
private double scores;//返回的分数,用来判定识别是否达标
private string group_id;//用户所在的用户组,或者说部门
private int error_code;//返回得错误代码
private string error_msg;//返回得错误提示信息
public Text DebugText;
public Text DebugText1;
public Text DebugText2;
private string result_group_id;//result返回的用户组数据
private string result_uid;//result返回的用户id数据
private string resul
百度人脸识别之人脸识别FaceIdentify(签到考勤)
最新推荐文章于 2023-08-03 11:50:23 发布
此代码示例展示了如何在Unity中利用百度人脸识别API进行FaceIdentify操作,用于签到考勤。通过读取图片并调用API,根据返回的错误代码判断识别结果,并显示相关信息。
摘要由CSDN通过智能技术生成