5

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

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

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

marsei
  • 7,691
  • 3
  • 32
  • 41
shau-kote
  • 1,110
  • 3
  • 12
  • 24

2 Answers2

9

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'

Yotam
  • 9,789
  • 13
  • 47
  • 68
  • Last release - 0.0.1 - in May, 2007. It is developed? – shau-kote Jul 14 '13 at 04:38
  • I guess not, I didn't even noticed when I downloaded it. Anyway, I don't know other options and this was good for me, so its worth a shot – Yotam Jul 14 '13 at 06:50
  • Updating old thread here, but important info: use pytesseract instead. Pytesser has been renamed and forked. –  Jun 29 '19 at 23:34
6

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

gerosalesc
  • 2,983
  • 3
  • 27
  • 46
austin-schick
  • 1,225
  • 7
  • 11