OCR的tesseract图书馆 - 学习字体 [英] Tesseract OCR Library - Learning Font

查看:267
本文介绍了OCR的tesseract图书馆 - 学习字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯,我用这个OCR可以找到一个符合.NET版本@ <一个href=\"http://www.pixel-technology.com/freeware/tessnet2/\">http://www.pixel-technology.com/freeware/tessnet2/

Well I'm using a complied .NET version of this OCR which can be found @ http://www.pixel-technology.com/freeware/tessnet2/

我有工作,但这样做的目的是把车牌,可悲的是发动机确实没有准确地翻译一些字母,例如这里是我扫描,以确定字符问题的图像

I have it working, however the aim of this is to translate license plates, sadly the engine really doesn't accurately translate some letters, for example here's an image I scanned to determine the character problems

结果:

12345B7B9U
ABCDEFGHIJKLMNUPIJRSTUVHXYZ

12345B7B9U ABCDEFGHIJKLMNUPIJRSTUVHXYZ

因此​​,以下字符被翻译错误:

Therefore the following characters are being translated incorrectly:

1,O,Q,W

这似乎并不太差,但在我的车牌,结果并不那么大:

This doesn't seem too bad, however on my license plates, the result isn't so great:

= H4 ODM

= H4 ODM

= LDH IFW

= LDH IFW

假测试

= NR4 2000年

= NR4 y2k

正如你可能可以告诉,我已经试过降噪,提高对比度,并删除都不是绝对的黑色像素,没有真正的改善。

As you might be able to tell, I've tried noise reduction, increasing contrast, and remove pixels that aren't absolute black, with no real improvements.

显然,你可以学习发动机的新字体,但我想我需要重新编译为.NET库,也似乎这是对Linux操作系统进行,我没有。

Apparently you can 'learn' the engine new fonts, but I think I would need to re-compile the library for .NET, also it seems this is performed on a Linux OS which I don't have.

<一个href=\"http://www.scribd.com/doc/16747664/Tesseract-Trainingfor-Khmer-LanguageFor-Posting\">http://www.scribd.com/doc/16747664/Tesseract-Trainingfor-Khmer-LanguageFor-Posting

所以我坚持的东西来尝试下,我纯粹是写了一个快速的控制台应用程序以进行测试,如果有人想尝试一下。如果任何人有任何想法/图形处理/库的想法,我想AP preciate听他们。

So I'm stuck as what to try next, I've wrote a quick console application purely for testing purposes if anyone wants to try it. If anyone has any ideas/graphic manipulation/library thoughts, I'd appreciate hearing them.

推荐答案

我通过Tessnet2的tesseract用最近(Tessnet2大约2.0的tesseract一个VS2008 C ++包装由雷米托马斯做,如果我记得很清楚)。让我尝试帮助您与我有任何关于这个工具的小知识:

I used Tesseract via Tessnet2 recently (Tessnet2 is a VS2008 C++ wrapper around Tesseract 2.0 made by Rémy Thomas, if I remember well). Let me try to help you with the little knowledge I have concerning this tool:


  • 1,正如我上面所说,此包装只对2.0的tesseract和最新在谷歌code 的tesseract版本是3.00(在code不再托管于开源社区)。有定期撰稿人:我看到的版本3.01左右的计划。所以,你不从最后的改进中获益,包括页面布局分析当你的车牌是不是100%的水平可能有所帮助。

  • 1st, as I said above, this wrapper is only for Tesseract 2.0, and the newest Tesseract version on Google Code is 3.00 (the code is no longer hosted on Source Forge). There are regular contributors: I saw that version 3.01 or so is planned. So you don't benefit from the last enhancements, including page layout analysis which may help when your license plates are not 100% horizontal.

我问雷米持续约3版本Tessnet2 .NET包装,他没有计划任何现在。所以,像我一样,你必须自己做吧!

I asked Rémy for a Tessnet2 .NET wrapper around version 3, he doesn't plan any for now. So as I did, you'll have to do it by yourself !

所以,如果你想获得最新版本的来源,可以从下载它们颠覆库(一切都在专门的网站页面)描述你就可以,如果对它们进行编译你有Visual Studio 2008中,因为它们包含源在 VS2008 子文件夹中的VS2008的解决方案。该解决方案是由VS2008 C ++项目,这样才能够获得在C#中的结果,你将不得不使用.NET的P /与该项目建成 tessDll 调用。同样,如果你需要这个,我有code例子您可能会感兴趣,但你可能要留在C ++,做你自己的新的WinForm的项目,比如!

So if you want to get the latest version of the sources, you can download them from the Subversion repository (everything's described on the dedicated site page) and you'll be able to compile them if you have Visual Studio 2008, since they sources contain a VS2008 solution in the vs2008 sub-folder. This solution is made of VS2008 C++ projects, so to be able to get results in C# you'll have to use .NET P/Invoke with the tessDll built by the project. Again if you need this, I have code examples that may interest you, but you may want to stay with C++ and do your own new WinForm projects, for instance !

当你已经取得编译(不应该有针对的主要问题,但告诉我,如果你遇到了一些,也许是我太:-)见到他们),你必须在几个输出二进制文件将让你做一个具体的训练!此外,还有一个页面专门致力于的tesseract 3训练。由于本次培训,您可以:

When you have achieved to compile (there should not be major problems for that, but tell me if you meet some, I may have met them too :-) ), you'll have in output several binaries that will allow you to do a specific training ! Again, there is a page specially dedicated to Tesseract 3 training. Thanks to this training, you can:


  • 克制你的字符集,这将自动删除标点符号('/ - \\',而不是'A',例如)

  • restrain your set of characters, which will automatically remove the punctuation ('/-\' instead of 'A', for instance)

表示您已检测到的模糊性('D',而不是'O',你可以看到,'B',而不是'8'等)将被考虑在内时,你会用你的训练。

indicate the ambiguities you have detected ('D' instead of 'O' as you could see, 'B' instead of '8' etc) that will be taken into account when you will use your training.

我也看到了的tesseract结果,如果你抑制了图像,其中字母所在的区域有更好的(即没有面子,周围没有横向):在我的情况,我需要认识到只有特定区域从摄像头拍摄的照片卡,所以我用图像处理来抑制区域。这是漫长的,当然,但我的图片来自许多不同的来源来,所以我别无选择。如果你能得到被抑制到最小的图像,这将是伟大的!

I also saw that Tesseract results are better if you restrain the image to the zone where the letters are located (i.e. no face, no landscape around): in my case, I needed to recognize only a specific zone of cards photos taken from a webcam, so I used image processing to restrain the zone. That was long, of course, but my images came from many different sources so I had no choice. If you can get images that are restrained to the minimum, that will be great !

我希望这是任何帮助,不要犹豫,给我你的意见和问题!

I hope it was of any help, do not hesitate to give me your remarks and questions !

这篇关于OCR的tesseract图书馆 - 学习字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆