【发布时间】:2019-11-24 00:00:48
【问题描述】:
我使用 Pytesseract 模块进行 OCR。这似乎是一个缓慢的过程。所以我跟着 Pytesseract is too slow. How can I make it process images faster?.
我使用了https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/tesseract-ocr/xvTFjYCDRQU/rCEwjZL3BQAJ 中提到的代码。但是出现错误
!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 201
Segmentation fault (core dumped),
然后我检查了一些帖子并获取参考以添加我的代码locale.setlocale(locale.LC_ALL, "C")。
所以在我的代码中添加了这个之后,我又遇到了一个错误
Traceback (most recent call last):
File "master_doc_test3.py", line 107, in <module>
tess = Tesseract()
File "master_doc_test3.py", line 67, in __init__
if self._lib.TessBaseAPIInit3(self._api, datapath, language):
ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type`
谁能给出这个错误的想法?或者如果有人知道使用 python 以最快的方式制作 OCR 的最佳方法。
【问题讨论】:
标签: linux python-3.x ocr cv2