如何使用 PHP 在网站上实现 OCR?
是否有可在 Linux 服务器上使用 PHP 或 Python 的免费 OCR 库?这个想法是能够上传图像并从中提取字符,或者允许用户“绘制字符”,并从所述图像中解析它们。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于您使用的是 Linux 机器,因此我强烈推荐 Google 的开源项目 ocropus。
它不是 PHP,但我认为它将是您的最佳选择。当然,您可以通过
exec
从 PHP 中调用它。它已经成熟并且有很多选择。来自项目现场:还有另一个开源项目 tesseract。我过去也用过这个,并且对结果很满意。包括培训、限制字母表等。
Since you're on a Linux box, I would highly recommend Google's open source project ocropus.
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: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.
您看过 Andrey Kucherenko 的 phpOCR 课程吗?
http://www.phpclasses.org /package/2874-PHP-Recognize-text-objects-in-graphical-images.html
这是一篇旧文章,但可能对你有帮助。
Have you seen phpOCR classes of Andrey Kucherenko ?
http://www.phpclasses.org/package/2874-PHP-Recognize-text-objects-in-graphical-images.html
It's an old article but may help you.