How can I implement OCR on a website using PHP? [closed]

天大地大妈咪最大 提交于 2019-11-26 11:51:06

问题


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.


回答1:


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:

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.

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.




回答2:


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.



来源:https://stackoverflow.com/questions/2170271/how-can-i-implement-ocr-on-a-website-using-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!