简体   繁体   English

如何在iOS应用中识别图像中的手写数字?

[英]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.

相关问题 如何让OpenEars在iOS上识别语音号码? - How can I get OpenEars to recognize spoken numbers on iOS? 如何识别iOS上脸部的嘴和牙齿? - How can I recognize a mouth and teeth within a face on iOS? 我想为android和ios制作一个自动点击器应用程序,但它也可以截取屏幕截图并识别屏幕中的特定图像 - I want to make an autocliker app for both android and ios, but it can also take screenshots and recognize a specific image in the screen 如何识别ios中的键盘按键? - How can I recognize keyboard presses in ios? 如何让我的iOS应用识别按钮在哪行/列中? - How can I have my iOS app recognize which row/column a button is in? 我可以在iOS应用中设置设备级代理吗? 怎么样? - Can I set a device level proxy within an iOS app? How? 如何在应用程序本身中包含 iOS 应用程序图标图像? - How do I include iOS App Icon image within the app itself? 如何在iOS应用中检查下载的图像是否已损坏? - how can I check if image downloaded is corrupted or not in iOS app? 如何显示我的iOS或Android应用程序中App Store下载的数量? - How can I show the number of App Store Downloads within my iOS or Android App? 如何在数字的字符串中扫描以调整iOS应用程序中的字体大小? - How can I scan a string for numbers to adjust the font size in an iOS app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM