Exemplo n.º 1
0
 //二代身份证识别触发
 protected virtual void Cvr_GetNewDataEvent(object sender, CvrInfo e)
 {
     if (e.Number.IsNullOrEmpty())
     {
         return;
     }
     //当识别到新身份证,清空之前认证结果
     e.Number.ToSaveLog("新的身份证信息被发现:");
     ClearValue();
     try
     {
         if (CheckRule(e.Number))
         {
             //当识别到新身份证,清空之前认证结果
             var item = IrAdvanced.GetBitmapFromFile(e.PeopleImg);
             if (item != null)
             {
                 FaceFun.TimeStart();
                 Rft2 = Face.FaceTz(item);
                 if (Face.TzIr.ToInt32() == 0)
                 {
                     CvrPass = true;
                 }
                 else
                 {
                     "身份证照片人脸检测失败".ToSaveLog("Cvr_GetNewDataEvent");
                 }
                 FaceFun.TimeStop("读取身份证人脸数据耗时:");
             }
         }
     }
     catch (Exception ex)
     {
         ex.ToSaveLog("BaseFaceView:");
     }
 }