问题描述
有没有任何代码,我可以在Cocoa中使用,从照片中识别文本?让我们说,我用我的iPhone拍一张照片的一页书。
Is there any code out there, that I can use in Cocoa, to recognize text from photos? Let's say I snap a photo with my iPhone of a page of a book. I'd like to capture the text in it.
推荐答案
有一个工具包,这是一个开源的OCR引擎,目前由Google维护。 Olipion创建了一个,以便进入iPhone。我会说这是一个很好的开始。
There is the Tesseract OCR toolkit that is an open source OCR engine, currently maintained by Google. "Olipion" created a cross compilation tutorial to get in on the iPhone. I would say that this is a good place to start.
但是,有些原因你可能不想在手机上的OCR,即使你可以。其中包括:
However, there are reasons why you might not want to to OCR on the Phone even if you could. Some of these include:
- 即使是新的iPhone 4的处理器也不是那么快,既然你的应用程序不能真正运行在后台做
- 在移动设备上运行OCR可能是电池寿命的杀手。
- 每次
对于运行OCR的始终连接的移动设备,您需要更新OCR引擎在某个地方的服务器可能会更好。您可以轻松地升级您的OCR软件,您可以运行更强大的算法,然后移动设备可以处理等等。
For an always connected mobile device running the OCR on a server somewhere would be probably better. You could upgrade your OCR software easily, you could run much more powerful algorithms then a mobile device could handle and so on.
我不确定你能使用移动摄像头拍摄的照片获得良好的效果 - OCR系统的准确性随着使用手机相机可能捕获的光线不足,嘈杂,失真的图像而下降。
I am not so sure that you would be able to get good results from photos taken using a mobile camera -- accuracy of OCR systems goes way down with the kind of poorly lit, noisy, distorted images likely to be captured using a phone camera.
至于商业产品,有
作为机器OCR的替代品,总是有,在那里你可以支付少量的人为你做OCR。在给定图像来源的情况下,可能会做得更好。
As an alternative to machine OCR, there is always Mechanical Turk, where you could pay people small amount to do the OCR for you. Would probably do better at transcription given the image source.
这篇关于OCR(阅读文本从照片)在Cocoa?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!