Laravel Optical Character Reader(OCR) package using ocr engines like Tesseract under the hood.
- Read text from image using WebUI/Programing Interface
- Can be used as Laravel Facade
- Configurable and extendable
OCR Engine Tesseract should be install in the system(e.g. for ubuntu sudo apt-get install tesseract-ocr
). Follow Tesseract installation guide here. Make sure from the command line you have the tesseract
command available.
-
Update your project's
composer.json
file as bellow:"require": { "alimranahmed/laraocr": "dev-master" }
then execute
composer update
-
execute the following command to publish all relevant files:
php artisan vendor:publish
-
Add the following line in the
providers
array ofconfig/app.php
Alimranahmed\LaraOCR\LaraOCRServiceProvider::class,
and following line in the
allias
array of the same file'OCR' => Alimranahmed\LaraOCR\Facades\OCR::class,
This package can be used to read text from image to text using different type of interface like Web and Programming.
From anywhere of your code you can simply access the OCR
facade to scan image as below:
\OCR::scan($imagePath);
After successful installation of this package we already have a web interface to parse text from image. Simply go to {project-url}/ocr
, select your image then click the Parse Image
button.
Upload Image
Uploaded Image
Parsed text
- Restful API to accept image and return parsed text
- Artisan command to read image and show parsed text from CLI
- Multilingual support
- Adding More options which are already available in OCR engines
This package is licensed under Apache License, Version 2.0