文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>实现验证码图像文字的识别(C#调用DLL)

实现验证码图像文字的识别(C#调用DLL)

时间:2010-09-05  来源:行万里路 责任 创新 执着

请先下载http://asprise.com/product/ocr/index.php?lang=csharp 的SDK.里面提供了详细的OCR方法,如下:
将发现图像框picbVeryfyCode里的文字和文本框.txtVeryfyCode.Text是一致的.
数字识别率我碰到的几乎是100%
http://blog.csdn.net/crabo/
[DllImport("AspriseOCR.dll")] static extern string craboOCR(string file, int type);
private void GetVeryfyCode() {    if(File.Exists(_imgPath))//ok now?    {     try     {         this.picbVeryfyCode.Image = System.Drawing.Bitmap.FromFile(_imgPath);         _veryfyCode = craboOCR(_imgPath,-1);   //将返回string,并以"\r\n"结尾!!         _veryfyCode = _veryfyCode.Substring(0,4);         this.txtVeryfyCode.Text = _veryfyCode;     }     catch(Exception e)     {        this.lblResult.Text += e.Message;     }    } }
此文转载自www.opent.cn/a/092/770.shtml
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载