/// <summary>1:1 对比人脸库</summary> public bool FaceMatch(byte[] bytes) { JsonParse.BaiduFaceList.Result result = JsonParse.BaiduFaceList.ParseJsonFaceList(GetFaceList().ToString()).result; List <string> tokenList = new List <string>(); for (int i = 0; i < result.face_list.Length; i++) { tokenList.Add(result.face_list[i].face_token); } try { for (int j = 0; j < tokenList.Count; j++) { if (BaiDu.facecompare(bytes, tokenList[j])) { return(true); } } return(false); } catch (Exception) { throw; } }
/// <summary>注册用户</summary> public void SignUpNewPerson(byte[] bytes) { try { BaiDu.addface(bytes); } catch (Exception) { throw; } }
/// <summary>获取用户组</summary> public void GetGroupList() { try { BaiDu.getgrouplist(); } catch (Exception) { throw; } }
/// <summary>注册用户组</summary> public void FaceCreatGroup() { try { BaiDu.creatgroup(); } catch (Exception) { throw; } }
/// <summary>获取用户组</summary> public JObject GetUserList() { try { return(BaiDu.getusers()); } catch (Exception) { throw; } }
public JObject Search(byte[] bytes) { try { return(BaiDu.search(bytes)); } catch (Exception) { throw; } }
/// <summary>获取用户列表</summary> public JObject GetFaceList() { try { return(BaiDu.getfacelist()); } catch (Exception) { throw; } }
public JObject GeneralEnhanced(byte[] bytes) { try { return(BaiDu.general_enhanced(bytes)); } catch (System.Exception e) { Debug.Log(e.Message); throw; } }
public JObject AccurateBasic(byte[] bytes) { try { return(BaiDu.accurate_basic(bytes)); } catch (System.Exception e) { Debug.Log(e.Message); return(null); } }
public JObject GeneralBasic(byte[] bytes) { try { return(BaiDu.general_basic(bytes)); } catch (System.Exception e) { Debug.Log(e.Message); return(null); } }
public JObject Handwriting(byte[] bytes) { try { return(BaiDu.handwriting(bytes)); } catch (System.Exception e) { Debug.Log(e.Message); return(null); } }
public JObject DriverBehavior(byte[] bytes) { try { return(BaiDu.driverBehavior(bytes)); } catch (System.Exception e) { Debug.Log(e.Message); return(null); } }
public JObject BodySeg(byte[] bytes) { try { return(BaiDu.bodySeg(bytes)); } catch (System.Exception e) { Debug.Log(e.Message); return(null); } }
/// <summary>人脸检测</summary> public JObject FaceDetect(byte[] bytes) { try { return(BaiDu.detectface(bytes)); } catch (Exception e) { Debug.Log(e.Message); return(null); } }
public JObject MultiSearch(byte[] bytes) { try { return(BaiDu.multi_search(bytes)); } catch (Exception e) { Debug.LogError(e.Message); } return(null); }