예제 #1
0
    /// <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;
        }
    }
예제 #2
0
 /// <summary>注册用户</summary>
 public void SignUpNewPerson(byte[] bytes)
 {
     try
     {
         BaiDu.addface(bytes);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #3
0
 /// <summary>获取用户组</summary>
 public void GetGroupList()
 {
     try
     {
         BaiDu.getgrouplist();
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #4
0
 /// <summary>注册用户组</summary>
 public void FaceCreatGroup()
 {
     try
     {
         BaiDu.creatgroup();
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #5
0
 /// <summary>获取用户组</summary>
 public JObject GetUserList()
 {
     try
     {
         return(BaiDu.getusers());
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #6
0
 public JObject Search(byte[] bytes)
 {
     try
     {
         return(BaiDu.search(bytes));
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #7
0
 /// <summary>获取用户列表</summary>
 public JObject GetFaceList()
 {
     try
     {
         return(BaiDu.getfacelist());
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #8
0
 public JObject GeneralEnhanced(byte[] bytes)
 {
     try
     {
         return(BaiDu.general_enhanced(bytes));
     }
     catch (System.Exception e)
     {
         Debug.Log(e.Message);
         throw;
     }
 }
예제 #9
0
 public JObject AccurateBasic(byte[] bytes)
 {
     try
     {
         return(BaiDu.accurate_basic(bytes));
     }
     catch (System.Exception e)
     {
         Debug.Log(e.Message);
         return(null);
     }
 }
예제 #10
0
 public JObject GeneralBasic(byte[] bytes)
 {
     try
     {
         return(BaiDu.general_basic(bytes));
     }
     catch (System.Exception e)
     {
         Debug.Log(e.Message);
         return(null);
     }
 }
예제 #11
0
 public JObject Handwriting(byte[] bytes)
 {
     try
     {
         return(BaiDu.handwriting(bytes));
     }
     catch (System.Exception e)
     {
         Debug.Log(e.Message);
         return(null);
     }
 }
예제 #12
0
 public JObject DriverBehavior(byte[] bytes)
 {
     try
     {
         return(BaiDu.driverBehavior(bytes));
     }
     catch (System.Exception e)
     {
         Debug.Log(e.Message);
         return(null);
     }
 }
예제 #13
0
 public JObject BodySeg(byte[] bytes)
 {
     try
     {
         return(BaiDu.bodySeg(bytes));
     }
     catch (System.Exception e)
     {
         Debug.Log(e.Message);
         return(null);
     }
 }
예제 #14
0
 /// <summary>人脸检测</summary>
 public JObject FaceDetect(byte[] bytes)
 {
     try
     {
         return(BaiDu.detectface(bytes));
     }
     catch (Exception e)
     {
         Debug.Log(e.Message);
         return(null);
     }
 }
예제 #15
0
 public JObject MultiSearch(byte[] bytes)
 {
     try
     {
         return(BaiDu.multi_search(bytes));
     }
     catch (Exception e)
     {
         Debug.LogError(e.Message);
     }
     return(null);
 }