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.

2 Answers 2

2

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.

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.