How to get character wise confidence in tesseract using command line?

廉价感情. 提交于 2019-11-28 05:10:59

问题


I am able to get word level confidence score using tesseract 4.0 through the command line. Interested to know if there is a way to get the character confidence too.

For word level confidence used the below command:

tesseract [Image name] outputbase --oem 1 -l eng --psm 8 tsv

回答1:


Set hocr_char_boxes to 1 in your config file. Or, at the command line, your updated command would be:

tesseract [Image name] outputbase --oem 1 -l eng --psm 8 -c hocr_char_boxes=1 hocr

Note the hocr output option and look in that file for ..._wconf, e.g.

 <span class='ocrx_word' id='word_1_1' title='bbox 127 344 4618 6915; x_wconf 1'>

Let me know if this works for you, otherwise I'll just delete the answer.

Source: https://github.com/tesseract-ocr/tesseract/issues/1465#issuecomment-513139976



来源:https://stackoverflow.com/questions/48162645/how-to-get-character-wise-confidence-in-tesseract-using-command-line

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