我使用tesseract 4.0来识别英语单词,但是在这个图像上失败只识别,没有任何单词被识别,
任何人都可以给小费,谢谢
r=pytesseract.image_to_string('6.jpg', lang='eng')
print(r)更新:
我试着用在线网站进行OCR。
而且很管用,但为什么?
我怎么才能用tesseract来识别它呢?
发布于 2020-12-25 05:25:55
问题是pytesseract不是旋转不变的.因此,您需要做额外的预处理.来源
- 
adaptive-threshold- 
pytesseract阅读,您需要设置其他配置:- pytesseract.image\_to\_string(thr, lang="eng", config="--psm 6")- PSM (page-segmentation-mode) 6 is Assume a single uniform block of text. [source](https://stackoverflow.com/questions/44619077/pytesseract-ocr-multiple-config-options)- You want to get the last sentence of the image.- txt = pytesseract.image\_to\_string(thr, lang="eng", config="--psm 6") txt = txt.replace('\f', '').split('\n') print(txt[len(txt)-2])- Result:- Continue Setub ie Gene网站可能会使用深度学习的方法来检测图像中的单词。但是,当我使用newocr.com时,结果是:
oy Eee a
setuP me -
continve aehttps://stackoverflow.com/questions/65445043
复制相似问题