How to use trained data with pytesseract?

北城余情 提交于 2019-12-04 10:27:21
thewaywewere

Below is a sample of pytesseract.image_to_string() with options.

pytesseract.image_to_string(Image.open("./imagesStackoverflow/xyz-small-gray.png"),
                                  lang="eng",boxes=False,
                                  config="--psm 4 --oem 3 
                                  -c tessedit_char_whitelist=-01234567890XYZ:"))

To use your own trained language data, just replace "eng" in lang="eng" with you language name(.traineddata).

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