tags:

views:

664

answers:

2

I am looking for a OCR component that converts images of text into characters using php.

I got a script tesseract-ocr from google code. How can I install and launch tesseract-ocr through php ?

As I am a beginner in PHP, I cant come up with the documentation they provided. I need some simple steps to install and launch ? thanks in advance.

+1  A: 

You will need to setup tesseract according to the documentation that is provided.

Then once tesseract is working correctly from the command-line, you can make the extension to access tesseract from PHP.

An excellent guide to wrapping C++ classes in a PHP extension can be found here

James
A: 

Wow, that answer is the hard way. I'm a PHP programmer and the website linked for wrapping c++ with PHP makes my brain hurt.

A better way for someone who is new to PHP is to use the exec() function in PHP to call the command line tesseract binary. You can then work with the output from the exec call in PHP or send the output to a file and work with the file in PHP.

greg