限制字符tesseract寻找 [英] Limit characters tesseract is looking for

查看:79
本文介绍了限制字符tesseract寻找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以限制 tesseract 寻找的字符集(例如,仅搜索字母az)?那会大大改善我的结果.

Is it possible to limit the set of characters that tesseract is looking for (e.g. search only for letters a-z)? That would improve my results greatly.

推荐答案

在tessdata/configs目录中创建配置文件(例如字母")-通常为/usr/share/tesseract/tessdata/configs

/usr/share/tesseract-ocr/tessdata/configs

Create a config file (e.g "letters") in tessdata/configs directory - usually /usr/share/tesseract/tessdata/configs
or
/usr/share/tesseract-ocr/tessdata/configs

并将此行添加到配置文件:

And add this line to the config file:

tessedit_char_whitelist abcdefghijklmnopqrstuvwxyz  

...或者也许[a-z]起作用.. dunno :-)
然后调用类似于以下内容的tesseract:

...or maybe [a-z] works.. dunno :-)
Then call tesseract similar to this:

tesseract input.tif output nobatch letters  

这将限制tesseract只识别所需的字符

That will limit tesseract to recognize only the wanted characters

这篇关于限制字符tesseract寻找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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