用于识别图像文本的简单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
Simple python library for recognition text from image
提问by shau-kote
I'm looking for a simple python library for text recognition from images. Images are similar to this:
我正在寻找一个简单的 python 库,用于从图像中识别文本。图像与此类似:
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
回答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 产生(稍微)更好的结果。这是其网站的链接