Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read text from an image with PHP [closed]

Tags:

php

image

I would like to try to read some of text from an image with PHP.

So if I have an image like this:

enter image description here

How can I extract the text "Some text" into a string.

All help and suggestions are appreciated.

like image 575
Adnan Avatar asked Jan 07 '10 22:01

Adnan


2 Answers

The process you are looking for is called Optical Character Recognition.

http://en.wikipedia.org/wiki/Optical_character_recognition

There is a package available, called phpOCR, that does exactly what you need.

http://sourceforge.net/projects/phpocr/

like image 105
David Pfeffer Avatar answered Sep 21 '22 13:09

David Pfeffer


phpOCR ist not the best choice, I would recommend TesseractOCR for PHP "A wrapper to work with TesseractOCR inside your PHP scripts." https://github.com/thiagoalessio/tesseract-ocr-for-php

like image 45
Sebastian Viereck Avatar answered Sep 18 '22 13:09

Sebastian Viereck