如何在Tesseract中设置配置变量以更好地识别代码?



我想使用Tesseract来识别代码。在他们的网站上说,我可以通过将配置变量load_system_dawgload_freq_dawg设置为false来禁用字典。

然而,我一直没能正确地做到这一点。

$ tesseract img.jpg output.txt --oem 0 -c load_system_dawg=0 load_freq_dawg=0
read_params_file: Can't open load_freq_dawg=0
Error: Tesseract (legacy) engine requested, but components are not present in /usr/share/tesseract-ocr/4.00/tessdata/eng.traineddata!!
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
有什么最好的处理方法吗?

首先,获取eng。使用遗留引擎或其他OCR引擎值(OEM)训练数据。

接下来,仔细阅读tesseract --help-extra的输出:

-c VAR=VALUE          Set value for config variables.
Multiple -c arguments are allowed.

相关内容

最新更新