Tesseract OCR How do I improve result?

◇◆丶佛笑我妖孽 提交于 2021-02-07 10:13:21

问题


I am having a hard time working with Tesseract, is there a way to improve the accuracy? How do I train it for myself, if needed?

the only thing I am doing is reading the following characters, XYZ:-0123456789 that's it! The pictures always look that way.

thanks!


回答1:


The output of Tesseract 4.00alpha with your image is

$ tesseract ICKcj.png - -l eng
*: 4606 Y; 4809 Z; 698

Warning. Invalid resolution 0 dpi. Using 70 instead.

Resample the picture to 50% and setting the dpi to 300:

The output with this image is slightly better and the warning is vanishing:

$ tesseract ICKcj-50.png - -l eng
X: 4606 Y: 4809 Z: 698

The only thing missing are the minus signs, which are printed quite irregular (a better resolution in the picture could help). It is also possible to restrict the output pattern in tesseract. Alternatively, you can try to guess the minus afterwards depending on the spaces between the X, Y, Z and the numbers.



来源:https://stackoverflow.com/questions/42990139/tesseract-ocr-how-do-i-improve-result

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