cla*_*rkk 4 linux ocr tesseract
为什么会返回此错误?
root@amd-3700-2gb ~/ocr_test # tesseract -l dan pdf.png out pdf
Tesseract Open Source OCR Engine v3.03 with Leptonica
Error opening data file /usr/local/share/tessdata/osd.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'osd'
Tesseract couldn't load any languages!
Warning: Auto orientation and script detection requested, but osd language failed to load
Run Code Online (Sandbox Code Playgroud)
root@amd-3700-2gb ~/ocr_test # tesseract --list-langs
List of available languages (3):
eng
dan
dan-frak
Run Code Online (Sandbox Code Playgroud)
这工作正常并输出文本 out.txt
tesseract -l dan pdf.png out
Run Code Online (Sandbox Code Playgroud)
这会创建out.pdf但也会返回提到的错误,并且PDF中的可搜索文本没有意义
tesseract -l dan pdf.png out pdf
Run Code Online (Sandbox Code Playgroud)