2017 © Pedro Peláez
 

library gocr-php

Gocr for PHP

image

zcastle/gocr-php

Gocr for PHP

  • Thursday, September 14, 2017
  • by zcastle
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ATENCION ESTE PROYECTO ES UN FORK DE https://github.com/stephane-monnot/gocr-php SE ACTUALIZO EL CODIGO PARA QUE SOPORTE VERSIONES SUPERIORES DE PHP 5.6

Agradecemos a stephane-monnot por el proyecto original

GOCR for PHP

A wrapper to work with Gocr inside PHP scripts., (*1)

Why?

This project makes easier the use of the OCR software named GOCR., (*2)

Dependencies

Installation

$ composer require zcastle/gocr-php

Usage

Instantiate the Gocr object with the image path:

$gocr = new Gocr('testData/images/welcome.png');

Recognize and get text content:

$textContent = $gocr->recognize();

Set spacewidth between words in units of dots (default: 0 for autodetect):

Wider widths are interpreted as word spaces, smaller as character spaces., (*3)

$gocr->setSpaceWidthParam(20);

Set Operational mode; mode is a bitfield (default: 0):

$gocr->setModeParam(258);

Set value for certainty of recognition (0..100; default: 95):

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., (*4)

$gocr->setValueForCertaintyOfRecognitionParam(100);

Set database path, a final slash must be included, default is ./db/:

This path will be populated with images of learned characters., (*5)

$gocr->setDatabasePathParam('testData/db/');

Contributing

See the CONTRIBUTING file., (*6)

License

The project is open-sourced software licensed under the MIT license., (*7)

The Versions