用于识别图像文本的简单python库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17630650/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 08:44:44  来源:igfitidea点击:

Simple python library for recognition text from image

pythonpython-3.xocr

提问by shau-kote

I'm looking for a simple python library for text recognition from images. Images are similar to this:

我正在寻找一个简单的 python 库,用于从图像中识别文本。图像与此类似:

enter image description here

在此处输入图片说明

The image contains a very pure and simple - one line, numbers and hyphens, but the resolution is low.

图像包含非常纯粹和简单——一行、数字和连字符,但分辨率低。

I would like something similar (in an ideal):

我想要类似的东西(理想情况下):

 text = recognize(open('image.png', 'rb').read())

Does something similar exists? Thanks.

是否存在类似的东西?谢谢。

UPD

UPD

I know about pytesser and OCRopus. But as far as I understand they don't support Python 3.x.

我知道 pytesser 和 OCRopus。但据我所知,他们不支持 Python 3.x。

采纳答案by Yotam

I used pytesser. Very easy to learn, and did a great job for me. If you don't like this option, search for 'python OCR library'

我使用了pytesser。非常容易学习,对我来说做得很好。如果您不喜欢此选项,请搜索“python OCR 库”

回答by Schickmeister

OCRopus is another easy to learn OCR library for python. It also seems to yield (slightly) better results than pytesser. Here's the link to its site

OCRopus 是另一个易于学习的 Python OCR 库。它似乎也比 pytesser 产生(稍微)更好的结果。这是其网站链接