Tesseract OCR与Python image_to_string错误

时间:2018-06-08 03:10:02

标签: python ocr tesseract python-tesseract pytesser

我试图通过跟随this tutorial在Cloudera中使用python运行Tesseract OCR但是当我运行以下命令时:

python ocr.py --image images/example_01.png 

我收到了这个错误,我不知道问题出在哪里

Traceback (most recent call last):
  File "ocr.py", line 44, in 
    text = pytesseract.image_to_string(Image.open(filename))
  File "/usr/local/lib/python3.5/site-packages/pytesseract/pytesseract.py", line 193, in image_to_string
    return run_and_get_output(image, 'txt', lang, config, nice)
  File "/usr/local/lib/python3.5/site-packages/pytesseract/pytesseract.py", line 140, in run_and_get_output
    run_tesseract(**kwargs)
  File "/usr/local/lib/python3.5/site-packages/pytesseract/pytesseract.py", line 116, in run_tesseract
    raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (2, 'Usage: python pytesseract.py [-l lang] input_file')
你能给我一个解决方案吗?

0 个答案:

没有答案