I had clone git library of OCR using this link .
git clone git://github.com/thiagoalessio/tesseract-ocr-for-php.git
then simply i include the required file by following this example
here is the example code which i m trying to run
require_once './src/TesseractOCR.php';
$tesseract = new TesseractOCR('text.png');
$text = $tesseract->recognize();
echo "The recognized text is:", $text;
But always it fires a fatal Error
Fatal error: Uncaught Error: Call to undefined method TesseractOCR::recognize()
Edit I tried to use run()
instead of recognize()
require_once './src/TesseractOCR.php';
$tesseract = new TesseractOCR('text.png');
$text = $tesseract->run();
var_dump($text);
echo PHP_EOL, "The recognized text is:", $text, PHP_EOL;
Then result is : string(0) "" The recognized text is:
I had tried my best to find some appropriate solution but failed to find some authentic solution