[英]How can I recognize handwritten numbers within an image in an iOS app?
I'm trying to develop an iOS app that allows the user to take a photograph of a handwritten phone number. 我正在尝试开发一个iOS应用程序,允许用户拍摄手写电话号码的照片。 Is there any library available that will allow me to extract the numerical values from the handwriting in this picture?
有没有可用的库可以让我从这张图片中的手写中提取数值?
First you need to use OCR to recognize the text from the image. 首先,您需要使用OCR识别图像中的文本。 One of the most popular open0source libraries used for iOS OCR is a Google-sponsored open source project called tesseract .
用于iOS OCR的最受欢迎的open0source库之一是由Google赞助的名为tesseract的开源项目。
Here's how to compile OCR for iOS: 以下是如何为iOS编译OCR:
http://robertcarlsen.net/2010/09/24/compiling-tesseract-v3-for-iphone-1299 http://robertcarlsen.net/2010/09/24/compiling-tesseract-v3-for-iphone-1299
After you get the text, do this to call the number: 收到文本后,请执行此操作以拨打该号码:
NSString *phoneURLString = [NSString stringWithFormat:@"tel:%@", phoneNumberFromOCR];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneURLString]]];
I would put the above code in an IBAction connected to a button maybe called "Call", so when the user presses the "Call" button, this code is called and the number recognized from the image is called. 我将上面的代码放在一个IBAction中,该IBAction连接到一个叫做“Call”的按钮,所以当用户按下“Call”按钮时,会调用该代码并调用从图像识别的数字。
Hope this helps! 希望这可以帮助!
Try OpenCV and tesseract-ocr. 尝试OpenCV和tesseract-ocr。 Good luck, you've got your work cut out for you.
祝你好运,你的工作已经完成了。
http://opencv.org/
https://code.google.com/p/tesseract-ocr/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.