hossamsoliuman/laravel-ocr
Composer 安装命令:
composer require hossamsoliuman/laravel-ocr
包简介
Optimal character recognition with Laravel
README 文档
README
The Laravel OCR package provides optimal character recognition capabilities in Laravel applications. It integrates with Tesseract OCR and offers features such as offline OCR, language selection, and more.
Table of Contents
Package Dependencies
This package depends on Tesseract OCR. Before using the Laravel OCR package, you must install Tesseract OCR on your server. You can find installation instructions for various operating systems on the Tesseract OCR Page https://github.com/tesseract-ocr/tesseract.
Installation
Software Installation
For Windows users, we provide installation guidance in the screenshot. Please clich the https://github.com/tesseract-ocr to install Tesseract OCR on your Windows machine.
For general users and not windows specifically, you can visit https://tesseract-ocr.github.io/tessdoc/Installation.html
Package Installation
To install the Laravel OCR package, you can use Composer:
composer require hossamsoliuman/laravel-ocr
Usage
Routes and Controllers
Routes
This package provides routes and controllers for OCR processing. You can access the OCR functionality via the following routes:
-
POST /api/offline-ocr/image: Perform offline OCR on an image.
- Accepts
image(image file) andlang(language selection) parameters. - Optional
user_wordsparameter for user-specific words (see User Words).
- Accepts
-
GET /languages: Retrieve a list of available languages for OCR.
Make sure to include these routes in your Laravel application as needed. You can also customize the routes and controllers to fit your application's requirements.
Available Languages
You can select the language(s) for OCR processing using the lang parameter when making requests. By default, English (eng) is used. You can specify multiple languages as a comma-separated list, e.g., eng,ara.
To retrieve a list of available languages, you can access the /languages route.
User Words
You can provide a user-specific words file to improve OCR accuracy when dealing with technical terminology or jargon. To use user words, include the user_words parameter when making OCR requests, and provide a text file containing the desired words.
Example usage:
curl -X POST -F "image=@image.png" -F "user_words=@user-words.txt" http://your-app.com/offline-ocr/image
Current and Upcoming Features
Here's a table detailing the current and upcoming features of the Laravel OCR package:
| Feature | Status |
|---|---|
| Offline OCR | ✅ Available |
| Language Selection | ✅ Available |
| User Words | ✅ Available |
| Download Language Support | ⏳ Upcoming |
| PDF Support | ⏳ Upcoming |
| Google vision Support | ⏳ Upcoming |
| More Features | ⏳ Upcoming |
Contributing
Contributions are welcome! We appreciate your interest in improving this package. To get started with contributing, please read our contribution guidelines. Your contributions can help make this package even better.
License
This package is open-source software licensed under the MIT License. You are free to use, modify, and distribute this software in accordance with the terms of the MIT License. See the LICENSE file for more details.
hossamsoliuman/laravel-ocr 适用场景与选型建议
hossamsoliuman/laravel-ocr 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 09 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 hossamsoliuman/laravel-ocr 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hossamsoliuman/laravel-ocr 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-19
