2017 © Pedro Peláez
 

library ocrphp

a simple and beautiful ocr php library which can easily recognize the image to text depend on tesseract-ocr (一个简洁优雅的图像识别转换文字的php类库, 须安装tesseract-ocr)

image

fizzday/ocrphp

a simple and beautiful ocr php library which can easily recognize the image to text depend on tesseract-ocr (一个简洁优雅的图像识别转换文字的php类库, 须安装tesseract-ocr)

  • Friday, February 3, 2017
  • by fizz
  • Repository
  • 2 Watchers
  • 5 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 19 % Grown

The README.md

OcrPHP

description

a simple and beautiful ocr php library which can easily recognize the image to text depend on tesseract-ocr ( 一个简洁优雅的图像识别转换文字的php类库, 须安装tesseract-ocr), (*1)

useage

english document
中文文档, (*2)

install with composer

{
    "require": {
        "fizzday/ocrphp": "dev-master"
    }
}

or, (*3)

composer require fizzday/ocrphp

notice : before recognize , you need install the tesseract engine, which can find in my blog ..., (*4)

recognize

use Fizzday\OcrPHP;

OcrPHP::file($file)->run();

// or

OcrPHP::file($file)->lang($lang)->psm($psm)->run($type);

it shall like :, (*5)

OcrPHP::file('/var/www/img/test.jpg')->lang('eng')->run();

// or

OcrPHP::file('/var/www/img/test.jpg')->lang(['eng', 'chi_sim'])->psm(3)->run('id');

comment, (*6)

  • $file -- the source file in local
  • $lang -- the recognize language , like english(eng), chinese(chi_sim or chi_tra) ......
  • $psm -- the reconize type default 3
  • $type -- the Specific results like id_num, business card ...... which can return the info you need directly, default null, thie library have offered the id_num return , you just need the 'id' param in run() method

The Versions

03/02 2017

dev-master

9999999-dev

a simple and beautiful ocr php library which can easily recognize the image to text depend on tesseract-ocr (一个简洁优雅的图像识别转换文字的php类库, 须安装tesseract-ocr)

  Sources   Download

MIT

by Avatar fizz

php tesseract recognize tesseract-ocr