训练tesseract与iPhone一起使用 [英] Training tesseract to use with iPhone

查看:131
本文介绍了训练tesseract与iPhone一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的iPhone应用程序中使用tesseract-2.04,只想检测数字。我在这里做的是首先我使用这篇文章交叉编译tesseract来生成lib文件 http://robertcarlsen.net/2009/07/15/cross-compiling-for-iphone-dev-884 然后在 http://robertcarlsen.net/2010/01/12/ocr-for-iphone- source-1080 ,但结果远不如现实。

I am trying to use tesseract-2.04 in my iPhone application and just want to detect the numbers. What I am doing here is first I am cross compiling tesseract to generate lib file using this post http://robertcarlsen.net/2009/07/15/cross-compiling-for-iphone-dev-884 and then using the the demo application at http://robertcarlsen.net/2010/01/12/ocr-for-iphone-source-1080 , but the results far away than realistic.

我无法解决问题或如何训练tesseract以便关闭实用。

I am not able to resolve the issue or how to train tesseract so that it comes closure for practical usage.

请帮忙。

谢谢,

Madhup

推荐答案

我的成绩设定相当不错

TessBaseAPI::SetVariable("tessedit_char_whitelist", "0123456789");

同时温和地敦促用户让数字适合某个方框。这使得我更容易找到数字,并确保用户保持图像稳定并保持合理的距离,从而产生更清晰的图像。

while gently urging the user to let the numbers fit in a certain box. This makes locating the numbers easier for me, and ensures the user keeps the image steady and at a reasonable distance leading to a sharper image.

我考虑过改变valid_word( )在tesseract-2.04 / dict / permute.cpp中,但似乎没有必要。

I have thought about altering valid_word() in tesseract-2.04/dict/permute.cpp, but there seems to be no need for that.

下一步是硬编码最小/最大字符大小所以识别时间可能会比现在的500毫秒少。接下来的步骤是添加一些能及时跟踪结果的代码,以便在90%的时间内读取 5 8 只有10%会让代码记住 5

The next step will be to hardcode a minimum/maximum char size so recognition time can become way less than the 500 ms it is now. Then the next step will be to add some code that keeps track of results in time, so that reading 5 90% of the time and 8 only 10% will lead the code to remember the 5.

这一切都取决于用例你有。我很幸运,因为我可以只显示一个200x50的包含数字的盒子。

It all depends on the use case you have. I'm lucky in the sense that I'm allowed to just show a 200x50 box which will contain the number.

这篇关于训练tesseract与iPhone一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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