Example #1
0
        private void btn_Start_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(pic_CarId.ImageLocation))
            {
                AttrMessage.ErrorMsg("请上传图片!");
            }
            else
            {
                var result = OcrAPI.GetPlateLicense(pic_CarId.Image);
                if (result.state)
                {
                    tb_result.Text = result.contextModel.ToJson();
                }
                else
                {
                    tb_result.Text = result.errorMsg;
                }
            }

            string verificationMsg = "";

            //errorMsg = "";
            //var verifyResult = ImageVerification.VerificationImage<IDCardRecognitionModel>(imagePath, System.Drawing.Imaging.ImageFormat.Jpeg, tempModel, out verificationMsg, out strbaser64);
            //if (!verifyResult.state)
            //{
            //    return verifyResult;
            //}
        }
Example #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (pb_verifyCode.Image != null)
     {
         tb_Result.Text  = "通用版:" + OcrAPI.GeneralBasic(pb_verifyCode.Image);
         tb_Result.Text += "\r\n高精度版:" + OcrAPI.Accurate(pb_verifyCode.Image);
     }
 }