A wrapper to work with Gocr inside PHP scripts.
This project makes easier the use of the OCR software named GOCR.
$ composer require shinbuntu/gocr-php
$gocr = new Gocr('testData/images/welcome.png');
$textContent = $gocr->recognize();
Wider widths are interpreted as word spaces, smaller as character spaces.
$gocr->setSpaceWidthParam(20);
$gocr->setModeParam(258);
Characters with a higher certainty are accepted, characters with a lower certainty are treated as unknown (not recognized); set higher values, if you want to have only more certain recognized characters.
$gocr->setValueForCertaintyOfRecognitionParam(100);
This path will be populated with images of learned characters.
$gocr->setDatabasePathParam('testData/db/');
See the CONTRIBUTING file.
The project is open-sourced software licensed under the MIT license.