Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple python library for recognition text from image

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.

like image 993
shau-kote Avatar asked Jul 13 '13 13:07

shau-kote


People also ask

Can Python read text from image?

Python-tesseract is an optical character recognition (OCR) tool for Python. It is an open-source text recognition engine. It is widely used to extract text from images or documents because it provides a more accurate result. The best part is that it supports an extensive variety of languages.

How do I create an OCR in Python?

Building an Optical Character Recognition in Python We first need to make a class using “pytesseract”. This class will enable us to import images and scan them. In the process it will output files with the extension “ocr.py”. Let us see the below code.


1 Answers

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'

like image 156
Yotam Avatar answered Nov 03 '22 01:11

Yotam