devcafeimers/textdetector
Composer 安装命令:
composer require devcafeimers/textdetector
包简介
PHP Text Detection from Image
README 文档
README
Requirements
- PHP 5.6 or ^7.1
- Tesseract
Installation
$ composer require cafeimers/textdetector
‼️ This library depends on Tesseract OCR, version 3.03 or later.
Note for Windows users
There are [many ways][tesseract_installation_on_windows] 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
⚠️ 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
Note for Linux/Ubuntu users
$ sudo apt-get install tesseract
Usage
Example 1
<?php use Cafeimers\Detector\DetectTextFromImage; require_once 'path/to/vendor/autoload.php'; dump( DetectTextFromImage::Detection('buktitransferbri.jpg', [ '34530102751333', '030301015869506', '1370010500300' ]) ); // return true or false
Example 2
<?php use Cafeimers\Detector\DetectTextFromImage; require_once 'path/to/vendor/autoload.php'; $collections = ['34530102751333','030301015869506','1370010500300']; dump( DetectTextFromImage::Detection('buktitransferbri.jpg', $collections) ); // return true or false
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-30