如何训练幼犬大小便Tesseract 4.0

ABCocr Optical Character Recognition (OCR) Component for C# ASP and .NET
Optical Character Recognition (OCR) with ABCocr .NET
ABCocr is a .NET Optical Character Recognition (OCR) product. You use ABCocr .NET to extract text from images.
ABCocr .NET is based around industry standard OCR software. At its heart is a custom version of the Tesseract 3 OCR engine.
The Tesseract OCR engine was originally developed by Hewlett-Packard UK.
It was one of the top three engines in the 1995 UNLV Accuracy test and is probably one of the most accurate open source OCR engines available.
Since then it has been extensively revised with sponsorship from Google.
Tesseract supports English, Spanish, German, French, Italian, Portuguese, Arabic, Bulgarian, Catalan, Chinese (simplified), Chinese (traditional), Croatian,
Czech, Danish (Fraktur script), Danish (standard), Dutch, Finnish, Greek, Hebrew, Hungarian, Indonesian, Japanese, Korean, Latvian, Lithuanian, Norwegian,
Polish, Romanian, Russian, Serbian, Slovak (Fraktur script), Slovak (standard), Slovenian, Swedish, Tagalog, Thai, Turkish, Ukrainian, and Vietnamese.
Tesseract can be trained to work in other languages as well.
What is ABCocr?
So why wouldn't I just use Tesseract? What does ABCocr .NET add?
100% Stable
The original Tesseract is based around a command line process which means that it does not matter if it occasionally terminates, crashes or leaks memory.
If you are running a modern in-process application you absolutely cannot have this type of behavior.
ABCocr resolves these issues and presents you with a 100% stable platform.
100% Performant
Because Tesseract was based around a command line process it cannot multithread.
ABCocr adds multithread support so you can spread load over multiple CPUs or cores and you can use it safely from multithreaded APIs like ASP.NET.
100% Compatible
Tesseract is 32-bit process and cannot be used in 64-bit applications.
This is a significant issue when so many operating systems are now based around 64-bit address space.
ABCocr eliminates this restriction and allows you to run in either x86 or x64 mode completely automatically.
100% Consistent
Tesseract is somewhat idiosyncratic.
If you've ever seen error messages telling you that your TIFF tags are in the wrong order you will know what we mean.
ABCocr eliminates this idiosyncrasy and provides a simple and uniform way of dealing with OCR.
100% Simple
We only have one example.
Why is this? Well because it's so simple to use we couldn't think of anything else that you would need.
In terms of the class structure there is an OCR class which provides methods for assigning images to be processed.
The results come back as a Page object which contains a list of Word objects.
Each Word object contains a list of Blob objects which, broadly speaking, correspond to characters.
All these objects have text and bounds so that you can work out where they are in the image.
It really is as simple as that!
& WebSupergoo Software之前我在&&&&一文中介绍了用C#识别简单不变形数字验证码,但是对于识别变形的 或生成位置变化比较频繁的 验证码的准确率却不高。
下面介绍一个开源的OCR引擎Tesseract2。值得庆幸的是虽然是开源的但是它的识别率较高,并不比其他引擎差劲。网上介绍Tessnet2也是当时时间排名第三的识别引擎,只是后来慢慢不维护了,目前是Google在维护,大家都知道Google 在搞电子图书馆,每天都有不同类目的书被扫描成电子版。所以有G老大维护,识别率差不到哪里去。呵呵。。别鄙视我。。。
Tessnet2 是用vc ++ 开发的,其中是生成Tessnet2.dll ,我们可以通过.net 来调用内部具体类库实现识别。
Tessnet2的使用:
1、点击链接下载Tessnet2.dll ,
&& Tessnet2是支持多国语的。语言包下载链接:
2、将Tessnet2.dll 添加到vs 引用中,和添加.net程序集一样。
3、用Tessnet2进行识别
WebRequest request = WebRequest.Create("http://sz.2zf.cn/js/code2.asp");
WebResponse response = request.GetResponse();
Stream st = response.GetResponseStream();
Bitmap bitmap = (Bitmap)Bitmap.FromStream(st);
UnCodebase ud = new UnCodebase(bitmap );
bitmap = ud.GrayByPixels();
ud.ClearNoise(128, 2);
pictureBox1.Image =
tessnet2.Tesseract ocr = new tessnet2.Tesseract();//声明一个OCR类
ocr.SetVariable("tessedit_char_whitelist", ""); //设置识别变量,当前只能识别数字。
ocr.Init(Application.StartupPath + @"\\tmpe", "eng", true); //应用当前语言包。注,Tessnet2是支持多国语的。语言包下载链接:http://code.google.com/p/tesseract-ocr/downloads/list
List&tessnet2.Word& result = ocr.DoOCR(bitmap , Rectangle.Empty);//执行识别操作
string code = result[0].T
textBox1.Text =
识别效果:
代码下载:
阅读(...) 评论()他的最新文章
他的热门文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)}

我要回帖

更多关于 边境牧羊犬如何训练 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信