我想从以图像形式存储的一堆表格中提取数据-
在导入tesseract时,它会提示安装Qhull (根据documentation http://pytesseract.readthedocs.io/en/latest/tutorials.html)
代码-
> import Image
> from tesseract import image_to_string
> print image_to_string(Image.open('test.png')) print
> image_to_string(Image.open('test-english.jpg'), lang='eng')我得到以下提示,但我无法正确输入目录-
Please enter the path to an existing directory where qhull should be installed: 我试着给目录加引号,也是通过一个变量,但它总是给我无效的目录错误
这应该是非常直截了当的,但我就是不明白。
提前谢谢。
发布于 2017-04-17 12:04:49
请改用pytesseract
pip install pytesseract发布于 2017-08-10 17:52:08
You Need to change some lines of codes in
C:\Python27\Lib\site-packages\tesseract\voro.py file
in line after
# Qhull installation
if config_parser.has_option('qhull','install-dir'):
_qhulldir = config_parser.get('qhull','install-dir').strip()
else:
# Ask user for qhull directory
## qstr = 'Please enter the path to an existing directory where qhull should be installed:
qstr = 'C:/Python27/Lib/site-packages/tesseract'
## _qhulldir = os.path.expanduser(raw_input(qstr).strip())
_qhulldir = os.path.expanduser(qstr)https://stackoverflow.com/questions/39995285
复制相似问题