pytesseract struggling to recognize clean black and white pictures with font numbers and 7 seg digits(python)

拥有回忆 提交于 2019-12-11 05:45:48

问题


I've been trying to get tesseract to recognize the numbers on this image:

but when running the script the output is empty meaning it can't

Any idea how to make it work? it doesn't seem like it should have a bad time converting the image into text and the same happens 7 segment digital digits and when trying to run tesseract on a noisier colored version of this image this does actually seem to work well in this example:

Any hints on how to get it to work?

Thanks for helping


回答1:


Tesseract is very sensitive to the image borders, so adding about 20 pix border around your filtered image will solve the issue.

Regarding 7-segment font as stated in tesseract issue - LSTM (tess 4.*) might not be the best approach and there are different libraries which can handle this better. You can try this tessdata for tesseract 3.4;



来源:https://stackoverflow.com/questions/51751953/pytesseract-struggling-to-recognize-clean-black-and-white-pictures-with-font-num

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