Tesseract user-pattern is not applied

独自空忆成欢 提交于 2019-12-04 22:24:45

问题


I want to do OCR on this image. This is pre-define format. ie first five will characters, then next four will be digits and last will be character.

When I execute following command

$ tesseract in.png stdout

I get output as BDVPD474SQ

So, I went for user-pattern. I created a file(in directory /usr/share/tesseract-ocr/tessdata/configs) named as bazaar (its content is as follow)

load_system_dawg     F
load_freq_dawg       F
user_patterns_suffix user-patterns

I also created a file, named as eng.user-patterns in directory /usr/share/tesseract-ocr/tessdata (its content is as follow)

\A\A\A\A\A\d\d\d\d\A

Still, I am getting same result

$ tesseract in.png stdout bazaar
BDVPD474SQ

What I am doing wrong ? Has anyone accomplished this by Tess4j ?

来源:https://stackoverflow.com/questions/33429143/tesseract-user-pattern-is-not-applied

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