Download the PHP package baraveli/bml-ocr without Composer
On this page you can find all versions of the php package baraveli/bml-ocr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bml-ocr
BML OCR:camera: (Experimental)
BML Transaction Receipt OCR based on Tesseract OCR. At the moment this returns the result as an array. We will be switching to an Receipt object with regex matching for a later release.
Would not recommend to use in production.
Installation
Via Composer:
:bangbang: This library depends on Tesseract OCR, version 3.02 or later.
Note for Linux users
It is pretty simple to install tesseract, run the following commands:
If the default installation doesn't include english language pack. You have to pull that one seperately, run the following command:
Note for Windows users
There are many ways to install Tesseract OCR on your system, but if you just want something quick to get up and running, I recommend installing the Capture2Text package with Chocolatey.
choco install capture2text --version 3.9
:warning: Recent versions of Capture2Text stopped shipping the tesseract binary.
Note for macOS users
With MacPorts you can install support for individual languages, like so:
$ sudo port install tesseract-<langcode>
But that is not possible with Homebrew. It comes only with English support by default, so if you intend to use it for other language, the quickest solution is to install them all:
$ brew install tesseract --with-all-languages
Usage
The first argument of the make method is the path to the receipt you want to do OCR on. and the second argument is the temporary directory path. When the image path is first given it creates a temporary image with higher sharpness because the original BML receipt uses grey color for typography. It is really hard to detect by using just the default image. It deletes after finishing the detection.
When you call the detect method it will return the result as an array.
Result: