Tesseract OCR: is it possible to force a specific pattern?

落花浮王杯 提交于 2019-12-05 03:16:46

问题


I'm using Tesseract and I want to develop an app that is able to recognize a sequence of characters. I had good results but not exellent.

The characters sequence I want to read has always a specific pattern, let's say:

number number number char char - (e.g.: 123AB)

Is there a way to "tell" the ocr engine that the structure is always fixed, in order to improve the results of the recognition?

Thank you in advance.


回答1:


Try bazaar matching pattern in Tesseract:

\d\d\d\c\c



回答2:


You can use the "tessedit_char_whitelist" parameter



来源:https://stackoverflow.com/questions/14858514/tesseract-ocr-is-it-possible-to-force-a-specific-pattern

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