How can I implement OCR on a website using PHP?(如何使用 PHP 在网站上实现 OCR?)
问题描述
是否有任何免费的 OCR 库可以在 Linux 服务器上与 PHP 或 Python 一起使用?这个想法是能够上传图像并从中提取字符,或者允许用户绘制字符",并从所述图像中解析它们.
Are there any free OCR libraries that work with PHP or Python on a Linux server? The idea is to be able to upload an image and pull out characters from it, or allow users to "draw characters", and parse them out of said image.
推荐答案
由于您使用的是 Linux 机器,我强烈推荐 Google 的开源项目 ocropus.
Since you're on a Linux box, I would highly recommend Google's open source project ocropus.
它不是 PHP,但我认为它将是您的最佳选择.当然,您可以在 PHP 中通过 exec 调用它.它成熟并且有很多选择.来自项目站点:
It's not PHP, but I think it will be your best option. Of course you can call it from within PHP via exec. Its mature and has a lot of options. From the project site:
OCRopus 引擎基于两个研究项目:90 年代中期开发并由美国人口普查局部署的高性能手写识别器,以及新颖的高性能布局分析方法.
The OCRopus engine is based on two research projects: a high-performance handwriting recognizer developed in the mid-90's and deployed by the US Census bureau, and novel high-performance layout analysis methods.
还有另一个开源项目,tesseract.我过去也使用过它,并且对结果感到满意.包括培训、限制字母等.
There is also another open source project, tesseract. I've used this in the past as well and have been pleased with the results. Includes training, limiting your alphabet, etc.
这篇关于如何使用 PHP 在网站上实现 OCR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 PHP 在网站上实现 OCR?
基础教程推荐
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何替换eregi() 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
