Training tesseract to use with iPhone

我们两清 提交于 2019-12-03 06:22:47

问题


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.

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

Please help.

Thanks,

Madhup


回答1:


I get quite good results setting

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.

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

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.

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.



来源:https://stackoverflow.com/questions/3140455/training-tesseract-to-use-with-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!